You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jahlborn <ja...@gmail.com> on 2014/10/27 20:40:25 UTC
exclusive consumer doesn't seem to be working
i'm experimenting with the exclusive consumer in an activemq cluster
(currently running activemq 5.9.1), and it doesn't seem to be working for
me. we have activemq embedded in our product. i am testing with a two node
cluster, where there is an activemq instance embedded in each node and
clustered. i have a queue listener running on each node with the
"consumer.exclusive=true" flag set. (i've confirmed in JMX that the
consumers have the "exclusive" flag showing as true). i send 10 messages to
the queue on one node, and everything seems to be proceeding okay (the
consumer on that queue starts processing messages and the other consumer
gets none). however, if i then send 10 more messages (while the first 10
are still processing) to the queue on the _other_ node, then _both_
consumers start processing messages. am i doing something wrong? am i
misunderstanding the feature?
thanks,
-james
--
View this message in context: http://activemq.2283324.n4.nabble.com/exclusive-consumer-doesn-t-seem-to-be-working-tp4686733.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: exclusive consumer doesn't seem to be working
Posted by jahlborn <ja...@gmail.com>.
So i think i managed to get this working. Now my question is whether the
documentation for this feature on the website is accurate. Basically, after
doing a bit of spelunking in the activemq code base, it seemed to me that
while the exclusive flag is superficially associated with the consumer, it
really seems to be tied to the ActiveMQConnection instance. In our product,
the clients are embedded with the server, so all the consumers share a
single ActiveMQConnection instance. I had to create a second
ActiveMQConnection instance with the "exclusive consumer" flag set to true
and associate all the exclusive consumers with the exclusive connection
instance. After that, the feature seemed to work as advertised.
Can any activemq devs confirm my understandings of the current state of
affairs? and, if this is correct, is there something misleading about the
documentation for this feature (or is it just a "wart" related to my
somewhat unique scenario)?
--
View this message in context: http://activemq.2283324.n4.nabble.com/exclusive-consumer-doesn-t-seem-to-be-working-tp4686733p4686791.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.