[rabbitmq-discuss] a question about pushing the message to the queue , thank you all a lot
videlalvaro at gmail.com
Wed Nov 27 06:50:58 GMT 2013
I think the easiest would be to implement some kind of RPC logic so when
the consumer gets the "banana" message, it can publish a message back to
the sender so the sender can restart the sequence.
You could also try something with basic.nack and a bascic.qos of the number
of messages that you want to cycle through. So in your case you can set a
prefetch count of 3 and whenever you get the banana message you basick.nack
all three. See http://www.rabbitmq.com/nack.html
The first approach could be more flexible.
On Wednesday, November 27, 2013, yby538 at 163.com wrote:
> I have a sender and i have a receiver. Sender pushes the messages, apple
> ,orange ,banana to queue which is named "fruit"
> once the receiver gets the message "banana" and send the ack. i want the
> sender to be noticed so it can send the message "banana" to the queue
> you know, i mean, i want to ensure that the queue does always contains
> banana ,apple and orange and if one message was got by the receiver ,the
> sender will push it to the queue
> how to implement it, please?
> Does it make sense? i am very sorry since my English is very poor
> thanks a lot
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss