[rabbitmq-discuss] Different Stomp Issue: rabbitmq-stomp and Codehaus PHP Stomp class
Gavin M. Roy
gmr at myyearbook.com
Wed Jun 3 23:46:34 BST 2009
In our testing of RabbitMQ and Stomp I ran across two issues with the
rabbitmq-stomp connector and the CodeHaus.org Stomp PHP class.
Even though the protocol clearly defines the frame format, the
codehaus code appends a linefeed after the frame's null terminator,
which rabbitmq-stomp does not like. Instead of sending frame endings
as \0 they are sending them as \0\n.
In addition they send no-op \0's before senidng a frame, which
rabbitmq-stomp does not like.
I have uploaded a "fixed" version of the class which is based upon and
older version of CodeHaus's in addition to internal changes to use raw
sockets instead of file streams for communication:
This version was tested against both ActiveMQ 5.1 and RabbitMQ 1.5.3.
However, I do believe that the rabbitmq-stomp connector should be more
protocol variance tolerant and accept the \0\n frame ends and out of
frame \0 characters without causing issues. Since this is the
de-facto Stomp class for PHP, it makes sense to me for rabbitmq-stomp
to support their behavior.
I would publish a patch to them, but our code is based off of their
older single file, non re-factored code. Last year they re-factored
their code into multiple files, however the latest version still has
this same behavior.
More information about the rabbitmq-discuss