You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by SledgeHammer <gr...@firstam.com> on 2013/08/16 18:23:26 UTC

EXCEPTION - The Consumer has been Closed

What does it mean when we get this exception? Using C# / NMS. 5.9 Snapshot.



--
View this message in context: http://activemq.2283324.n4.nabble.com/EXCEPTION-The-Consumer-has-been-Closed-tp4670465.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: EXCEPTION - The Consumer has been Closed

Posted by Timothy Bish <ta...@gmail.com>.
On 08/16/2013 12:46 PM, SledgeHammer wrote:
> Haha :)
>
> Our scenario is that we have 200 consumers connecting to the server. They
> listen to the advisory queue so they know when queues are added / removed.
>
> Each producer creates two new queues. A send queue & a recv queue.
>
> When a queue is created, the consumers subscribe to it.
>
> Main work loop is to loop through the send queues and call ReceiveNoWait()
> w/ a prefetch of 1. So every queue gets serviced in a round robin fashion.
>
> Occasionally we get the "The Consumer has been Closed" exception.
>
> Does that just mean that I tried to call ReceiveNoWait() after the producer
> queue was deleted and before the client got the "queue deleted"
> notification?
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/EXCEPTION-The-Consumer-has-been-Closed-tp4670465p4670467.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
I can't really say since I don't know what your app is doing.  It sounds 
like somewhere in your code another thread is closing your consumers and 
your work loop isn't aware of it (race condition). The exception occurs 
when you use any method on the Consumer instance after the close() 
method has been called.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: EXCEPTION - The Consumer has been Closed

Posted by SledgeHammer <gr...@firstam.com>.
Haha :)

Our scenario is that we have 200 consumers connecting to the server. They
listen to the advisory queue so they know when queues are added / removed.

Each producer creates two new queues. A send queue & a recv queue.

When a queue is created, the consumers subscribe to it.

Main work loop is to loop through the send queues and call ReceiveNoWait()
w/ a prefetch of 1. So every queue gets serviced in a round robin fashion.

Occasionally we get the "The Consumer has been Closed" exception.

Does that just mean that I tried to call ReceiveNoWait() after the producer
queue was deleted and before the client got the "queue deleted"
notification?




--
View this message in context: http://activemq.2283324.n4.nabble.com/EXCEPTION-The-Consumer-has-been-Closed-tp4670465p4670467.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: EXCEPTION - The Consumer has been Closed

Posted by Timothy Bish <ta...@gmail.com>.
On 08/16/2013 12:23 PM, SledgeHammer wrote:
> What does it mean when we get this exception? Using C# / NMS. 5.9 Snapshot.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/EXCEPTION-The-Consumer-has-been-Closed-tp4670465.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
In the absence of other information I can only say it means your 
consumer is closed.

-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.fusesource.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/