You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by nickmich <ni...@gmail.com> on 2015/07/14 21:10:02 UTC

Re: How do you destroy orphaned consumers on the server/broker?

Does anyone know how to do this purely through the request? I'm currently
working on a Python client using the requests library, and my consumers are
still getting orphaned in AMQ after session.close() 



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-do-you-destroy-orphaned-consumers-on-the-server-broker-tp4680431p4699286.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How do you destroy orphaned consumers on the server/broker?

Posted by artnaseef <ar...@artnaseef.com>.
Monitoring is very important for ActiveMQ, so it's good to hear.  I've used
JMX and Jolokia for that purpose.  The advisories are useful for that as
well.



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-do-you-destroy-orphaned-consumers-on-the-server-broker-tp4680431p4699301.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: How do you destroy orphaned consumers on the server/broker?

Posted by artnaseef <ar...@artnaseef.com>.
It can be done, but may be tricky.  If the client is using the clientId
setting, then unsubscribe should work - just pass the same clientId. 
Otherwise, it's a little harder - the consumer is connected to the HTTP
session.  As long as the session matches (I believe that's a cookie and
possibly combined with username), then the unsubscribe should work.

Another approach here is to use the oneShot setting on the consumer so the
internal consumer created by the servlet does not stick around.

Note that I consider this to be an anti-pattern - that is, creating
consumers inside AMQ and leaving them around.  However, it is necessary as a
media-adapter for REST.  Generally the best practice is to use a separate
REST service that connects to ActiveMQ and consumes as-needed.



--
View this message in context: http://activemq.2283324.n4.nabble.com/How-do-you-destroy-orphaned-consumers-on-the-server-broker-tp4680431p4699293.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.