[rabbitmq-discuss] Unexpected behaviour with STOMP & NACK

Lionel Cons lionel.cons at cern.ch
Wed Feb 22 12:24:19 GMT 2012

I get an unexpected behaviour with STOMP & NACK with RabbitMQ 2.7.1.

Here is my test, using an empty queue.
 - client1 connects, sends a message to the queue and disconnects
 - client2 connects, subscribes to the queue with ack:client
 - client2 receives the message (so far so good) but does not ack it
 - client3 connects, subscribes to the queue
 - client2 sends a NACK frame for the message
 - client2 receives the message once more
 - client3 receives nothing

I would have expected the other client (client3) to receive the
message that has not been consumed by client2. In fact, this is how
ActiveMQ and Apollo work.

FWIW, the STOMP 1.1 spec mentions:

 | NACK is the opposite of ACK. It is used to tell the server that the
 | client did not consume the message. The server can then either send
 | the message to a different client, discard it, or put it in a dead
 | letter queue. The exact behavior is server specific.

So, although the behavior is not strictly defined, re-sending the
message to the same client does not look appropriate to me.

What do you think?



More information about the rabbitmq-discuss mailing list