I want to selectively delete messages from the AMQP queue without even reading them.
The scenario is as follows:
The sender wants to expire messages of type X based on the fact that new information of type X has appeared. Since it is very likely that the subscriber has not yet consumed the last message of type X, the publisher should simply delete the previous messages of type X and place the latter in the queue. The whole operation should be transparent to the subscriber - in fact, he should use something as simple as STOMP to receive messages.
How to do it using AMQP? Or maybe it is more convenient in another messaging protocol?
I would like to avoid complex infrastructure. All the necessary messaging is as simple as above: one queue, one subscriber, one publisher, but the publisher should be able to delete messages for specified criteria ad-hoc.
The publisher client will use Ruby, but in fact I would deal with any language as soon as I know how to do this in the protocol.
source
share