[rabbitmq-discuss] Callback - handleDelivery
cw storm
cwstorm at gmail.com
Fri Feb 7 13:55:00 GMT 2014
MK,
Not sure I understand. "Make sure your code is prepared for that." What
do you mean by that. Also, if thread pool, will it close once the broker
receive a "basicAck"?
On Fri, Feb 7, 2014 at 2:29 AM, Michael Klishin <mklishin at gopivotal.com>wrote:
>
> On 7 Feb 2014, at 05:00, cw storm <cwstorm at gmail.com> wrote:
>
> > It has to be done inside the "handleDelivery". It works if I perform
> the "doInvoke" outside of the "handleDelivery".
> >
> > try {
> > channel.basicConsume(strQueueName, false,
> > new DefaultConsumer(channel) {
> > @Override
> > public void handleDelivery(String consumerTag,
> > Envelope envelope,
> >
> AMQP.BasicProperties props,
> > byte[] body)
> > throws IOException
> > {
> >
> > try
> > {
> > Service.doInvoke(NSName,
> pipeline);
> > }
> > catch (Exception e) {
> > }
> > }
> > });
> > } catch (Exception e1) {
> > }
>
> Deliveries are dispatched to a thread pool (j.u.c. executor service). Make
> sure your code
> is prepared for that. Also, posting a stack trace would help.
>
> 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/20140207/04e7c491/attachment.html>
More information about the rabbitmq-discuss
mailing list