[rabbitmq-discuss] Unable to read the last published message

Emile Joubert emile at rabbitmq.com
Tue Dec 11 16:55:12 GMT 2012


Hi Anthony,

On 11/12/12 14:40, antony wrote:
> Now what I need is a way to remove the existing message from the queue when
> a new message arrives. Any thoughts ?

If such messages are not mixed with other messages then you could
emulate that in the client. Message consumers can obtain the queue
length (e.g. by using basic.get or queue.declare). This information can
be used to ignore older messages and only act on the most recent message.

This won't work if the relevant messages are mixed in with other
messages, and you will need to be careful if there are multiple
consumers reading from the same queue.





-Emile









More information about the rabbitmq-discuss mailing list