activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Noel Burton-Krahn <>
Subject activemq sends extra newline after null at end of Stomp frame
Date Wed, 01 Apr 2009 19:12:51 GMT
According to the stomp spec at, frames
are terminated by a NULL character.  However, activemq sends an extra
newline after the NULL.  See
line 90.

This bit me while I was using Perl's Net::Stomp client against activemq.  It
would read a complete message up to the NULL, and leave the extra newline on
the socket.  Net::Stomp has a can_read() function which returns true if
there is anything available to read on the socket, naively assuming that if
there is one byte available to be read, there must be a while message behind
it.  But, since there's only activemq's extraneous newline, can_read() will
return true and the next call to Net::Stomp will hang unexpectedly waiting
for a whole message.

Net::Stomp's can_read function could be written to be more robust, but the
real probem is activemq is not behaving according to spec.

Other than that, activemq is working quite well for us.  Thanks!


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message