[rabbitmq-discuss] Callback - handleDelivery

cw storm cwstorm at gmail.com
Fri Feb 7 01:00:21 GMT 2014


I have a service which looks like below.  For some reason, I get a
NullPointerException error when it tries to perform the "doInvoke".  How
can I have the doInvoke service execute successfully without going to the
catch block.  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) {
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140206/17c3a3e3/attachment.html>


More information about the rabbitmq-discuss mailing list