[rabbitmq-discuss] [2.4.0] random message loss with Stomp and topics? - solved

Michael Justin michael.justin at gmx.net
Tue Apr 19 18:09:50 BST 2011


Am 15.04.2011 16:44, Rob Harrop wrote:

> Are you referring to the tests distributed with Rabbit or do you have
> your own test code that you are running?

These are tests for my Delphi / Free Pascal client library, which are 
now close to the first release

> I can take a quick guess at why this is failing. The SUBSCRIBE frames
> are processed asynchronously. So, if you issue a few SUBSCRIBEs followed
> by a few SENDs then you might not see MESSAGE frames for the SUBSCRIBEs
> that are yet to finish processing.

This was my first thought too - so I inserted a long delay (several 
seconds) between the subscribe and the send. It did not solve the 
problem, the broker did not send all incoming messages to all 
subscribers. I could not find any pattern, so I was happy to see your 
answer and tried it today

> The best way to guarantee that a SUBSCRIBE has finished is to provide a
> receipt: header and then wait for the receipt. You'll see this pattern
> quite a lot in the RabbitMQ STOMP tests.

Adding a receipt header fixed the problem. However, this is not 
specified in the Stomp documentation (the receipt header is optional). 
(Maybe the requirement of using a receipt header should be added to the 
RabbitMQ Stomp adapter docs.)

Thanks and have a nice day

Michael Justin





More information about the rabbitmq-discuss mailing list