activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <...@artnaseef.com>
Subject Re: How do you destroy orphaned consumers on the server/broker?
Date Wed, 15 Jul 2015 00:21:27 GMT
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.

Mime
View raw message