[rabbitmq-discuss] a question about pushing the message to the queue , thank you all a lot

Alvaro Videla videlalvaro at gmail.com
Wed Nov 27 06:50:58 GMT 2013


Hi,

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.

Regards,

Alvaro

On Wednesday, November 27, 2013, yby538 at 163.com wrote:

>
> hi,all
>
> 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...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131127/1e17b025/attachment.htm>


More information about the rabbitmq-discuss mailing list