[rabbitmq-discuss] 回复: How long interval fetching message from MQSERVER?

thomas 1517427523 at qq.com
Tue Apr 1 06:16:48 BST 2014


Thanks for answering my question!


pls check my code below:


String message = client.getNextMessage();
if (message != null && !message.equals("")) {
	client.sendMessage(imqRec.handler(message));
}





If I use while(true) loop continuously monitor RPC queue, it would be very resource intensive, whether you grab a message per sec or anything else?


------------------ 原始邮件 ------------------
发件人: "Michael Klishin";<mklishin at gopivotal.com>;
发送时间: 2014年4月1日(星期二) 中午1:08
收件人: "Discussions about RabbitMQ"<rabbitmq-discuss at lists.rabbitmq.com>; 

主题: Re: [rabbitmq-discuss] How long interval fetching message from MQSERVER?



On 1 April 2014 at 09:07:00, thomas (1517427523 at qq.com) wrote:
> > I have a question in RPC callBack queue,if i use while(true)  
> to keep receiving message,How long interval fetching message  
> from MQ SERVER?

There is no timeout in the protocol (and if you consume with basic.consume,
it does not really make sense). So it depends on your client library. 
--  
MK  

Software Engineer, Pivotal/RabbitMQ
_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140401/6aba4289/attachment.html>


More information about the rabbitmq-discuss mailing list