activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From The4Summers <>
Subject VirtualTopic issue with virtualSelectorCacheBrokerPlugin
Date Thu, 08 Aug 2019 18:37:58 GMT

We recently started to use the  VirtualTopic concept in ActiveMQ
<>   with the selectorAware
attribute set to true, and with /virtualSelectorCacheBrokerPlugin/ to be
able to continue receiving selected (filtered) messages in the destination
queue even if a consumer if down.

We have producer and consumer services defined with Camel endpoints and
running as SpringBoot application .

*In activemq.xml:*
		 <virtualTopic name="VirtualTopic.>" prefix="Consumer.*."

- *In producer, virtual topic is defined with the following Camel URI*:


- *In consumer, the listening queue is defined with the following Camel


In our producer test, we are sending in loop same set of messages to the
destination virtual topic with few distinct application Id in the header
(DESTINATION_APP_ID). The selector configured in the consumers is used to
filter messages based on this header containing the application id. So we
expect that when the producer sends a bunch of notification messages to the
virtual topic (VirtualTopic.DeliveryCompletion), then they will be forwarded
to listener queues according to the configured selector expression. The role
of 'virtualSelectorCacheBrokerPlugin' is to cache all the selector
expressions for each consumer listening on the virtual topic queue.

Most of the time (I would say 99%) of the time, all this is working very
well. All messages are properly forwarded to the proper queues according to
the selector, other are discarded. However, after some time, some messages
are not filtered properly and are sent to all listening queues and they stay
there (since not accepted by consumers because of the selector).

When we disable the plugin in ActiveMQ, we do not have this problem, however
if one consumer goes down few minutes for example, it loose some messages of
course. To void loosing messages when consumers are down, we want to use the
plugin. But because we encountered that issue with it, it is not possible to
continue use this approach (for the moment we can reproduce the expected
behavior using the concept of Composite Destination, but is it not as
flexible as the VirtualTopic).

If anyone knows what is going on with this solution (with the
"virtualSelectorCacheBrokerPlugin" plugin?), let us know.

Sent from:

View raw message