[rabbitmq-discuss] Updating messages on queues

Matthew Sackman matthew at rabbitmq.com
Mon Jul 19 11:46:15 BST 2010


On Mon, Jul 19, 2010 at 03:21:54AM -0700, cbourne wrote:
> Does anybody know if it's possible to update messages on a queue without
> actually removing them.

Yes, I know. And no, there are no side-effect-free operations on
messages in a queue.

> My use case requires a message to be removed from a
> queue, only if the consumer is able to successfully process the message and
> perform an action contained therein. If the action fails then the message
> remains on the queue ready for a scheduled retry.

You simply want to have the consumers delay acknowledging the message
until after they've successfully processed the message. If they can't
process the message then presumably some error has occurred, which
you should make cause the client to close the channel on which it
received the message. That will cause the message to be requeued.

> I was thinking a message
> time value could be changed so consumers only process messages that are
> within a certain time range. If there's a better way to do this, any advice
> would be welcome. 

I'm afraid I don't really understand this. Can you explain this some
more?

Matthew


More information about the rabbitmq-discuss mailing list