[rabbitmq-discuss] Issue related to message consumption
Anand Ved
anand.ved at Xoriant.Com
Mon Jun 29 13:40:12 BST 2009
Hi,
I am implementing Rabbit MQ where in I have a client in Java that sends
out messages to a single Q. There is a consumer (extending
DefaultConsumer) that deals with this message, however, when ever I get
an exception in my consumer, it travels up to the Connection level and
closes the connection. This leads to no other messages being consumed
anymore.
I have a singleton class that initializes a Connection using
ConnectionFactory.
Using this connection, I have a Channel that declares an Exchange,
declares a Queue and binds the exchange and queue. As per the suggestion
in the documentation, since channel is not thread safe, I have it local
to each thread.
However, during consumption, I face an exception (say NullPointer) which
although I am catching it, traveses up to the Connection triggering it
to be closed.
Please suggest if there is a better way of managing this.
Regards,
Anand Ved | Xoriant Solutions Pvt. Ltd.
Winchester, Hiranandani Business Park, Powai, Mumbai 400076, INDIA.
Tel: +91 22 30511000 | +91 22 3051 1058 (Direct) | VOIP: + 1 408 834
4495
Yahoo IM: anandved | http://www.xoriant.com <http://www.xoriant.com/>
<<Picture (Device Independent Bitmap)>> Modern technology, Owes
ecology, An apology. ~Alan M. Eddison - Go Green!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090629/5fc2dd32/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/bmp
Size: 3126 bytes
Desc: Picture (Device Independent Bitmap)
Url : http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090629/5fc2dd32/attachment.bin
More information about the rabbitmq-discuss
mailing list