13 Commits

Author SHA1 Message Date
Bruno Tavares
05bea0dcb8 Lost debugging lines. 2014-09-09 11:59:43 +01:00
Bruno Tavares
24b1335000 Better routing clean up. Now requires explicit message handling 2014-09-09 11:54:11 +01:00
Pedro Melo
d807d361f3 Add --stats support for consumer:
Gives stats over the last 10 seconds, plus global rate.

Use with http_publisher.pl to test your consumer performance.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-21 05:47:33 +01:00
Pedro Melo
b69bd4a19b Make consumer.pl trap SIGINT and SIGTERM, disconnect cleanly
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-21 05:20:45 +01:00
Pedro Melo
1ff696d616 Add support for the factors parameter in publisher.pl:
We can multiply the number of messages delivery by factor, thus allowing
to test support for publishing multiple messages

Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-21 05:11:43 +01:00
Pedro Melo
5bd01740ee Improve consumer.pl:
* use Getopt::Long to enable/disable help, verbose and print mode;
* add proper usage message;
* keep track of total messages received.

Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-21 05:10:39 +01:00
Pedro Melo
71c97d864c Simple TCP publisher, reads STDIN, publishes one message per line
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 22:14:20 +01:00
Pedro Melo
3e54c101f4 Tidy
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 19:50:36 +01:00
Pedro Melo
35e310fd07 Tweak consumer to use the new disconnect_cb
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 19:50:36 +01:00
Pedro Melo
3579cc1a48 The message already has most of the important stuff
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 17:29:39 +01:00
Pedro Melo
87a8a18014 Catch and warn of errors, exit the script if one shows up
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 16:49:17 +01:00
Pedro Melo
7092c3b208 Fix: make sure consumer.pl can find the AnyEvent::NSQ::Reader lib
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 16:48:44 +01:00
Pedro Melo
306f8e4864 A simple consumer and a HTTP-based publisher, useful for simple benchmarks
Signed-off-by: Pedro Melo <melo@simplicidade.org>
2014-07-20 13:48:16 +01:00