Hi,<div><br></div><div>I think the easiest would be to implement some kind of RPC logic so when the consumer gets the &quot;banana&quot; message, it can publish a message back to the sender so the sender can restart the sequence.</div>
<div><br></div><div>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&nbsp;<a href="http://www.rabbitmq.com/nack.html">http://www.rabbitmq.com/nack.html</a></div>
<div><br></div><div>The first approach could be more flexible.&nbsp;<span></span></div><div><br></div><div>Regards,</div><div><br></div><div>Alvaro<br><br>On Wednesday, November 27, 2013, <a href="mailto:yby538@163.com">yby538@163.com</a>  wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div style="MARGIN:10px">
<div>
<div>&nbsp;</div>
<div>hi,all</div>
<div>&nbsp;</div>
<div>I have a sender and i have a receiver. Sender pushes the messages,&nbsp; 
apple ,orange ,banana to queue which is named &quot;fruit&quot;</div>
<div>&nbsp;</div>
<div>&nbsp;once the receiver gets the message &quot;banana&quot; and send the ack.&nbsp; i 
want the sender to be noticed so it can&nbsp; send the message &quot;banana&quot; to the 
queue</div>
<div>&nbsp; </div>
<div>&nbsp;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</div>
<div>&nbsp;</div>
<div>&nbsp;how to implement it, please?</div>
<div>&nbsp;</div>
<div>Does it make sense? i am very sorry since my English is very poor</div>
<div>&nbsp;</div>
<div>&nbsp;thanks a lot</div></div>
<div>&nbsp;</div>
<hr style="min-height:1px;WIDTH:210px" align="left" color="#b5c4df" size="1">

<div><span>
<div style="FONT-SIZE:10pt;FONT-FAMILY:verdana;MARGIN:10px">
<div>Ҷ��������ˣ��Ȱ��������Ӿ���о�����ʷ</div>
<div>ϲ�����飬˵Ц������٩���Լ�������</div>
<div>����΢ǿ��֢����һ���������ģ�ϲ����������</div>
<div>������ʳ������������ʳ�����ٳ�ˮ��</div>
<div>&nbsp;</div></div></span></div></div>
</blockquote></div>