Net::Stomp and the curious timing behaviour

Simon Wistow simon at
Mon Jan 8 14:03:56 GMT 2007

Java has this messaging API called JMS and one of the implementations is 
called ActiveMQ. ActiveMQ uses a binary protocol but can use a simpler 
text protocol calle STOMP (Simple Text Orientated Messaging Protocol) 
which in most cases is good enough. There are two implementations - one 
which sucks and one which was written by our very own Mr Brocard. It 

However, when performing tests I've come across some curious behaviour.

A JMS session has two parts - a producer and a consumer. I've written
simple consumers and producers in Perl and Java and benchmarked them. 
With the Java consumer both the Perl producer and the Java producer can 
produce several thousand messages a second and the consumer will, err, 
consume them.

However the Perl producer is rock solid at about 100 messages consumed a 
second. This seems a little suspicious to me - like something is 
wait()ing for 1/100th of a second somewhere deep down in the stack of 
IO::Socket::INET but I'm damned if I can find it.

Before I dig any deeper does this ring any bells for anyone? Or is it
just a limitation in the sockets. Should I maybe try and port to
Danga::Socket or something? 


More information about the mailing list