activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From loki12 <>
Subject Filtered destination doesn't act as Consumer to a topic
Date Thu, 16 May 2013 19:41:18 GMT
Sometime back I posted in following topic regarding binding queues with
topics and filtered destination was the answer. That indeed works but I'm
expecting something more.

*Scenario 1:*

1.1. 3 consumer is running on topic "topic.demo" . topic.demo shows 3
1.2. A producer publishes two messages to a topic with selectors odd=yes and
1.3. All 3 consumers instantly consume copy of both messages.

*Scenario 2*

2.1. Two filtered destination are configured to filter messages from
topic.demo as follows

          <compositeTopic name="topic.demo">
             <filteredDestination selector="odd = 'yes'" queue="FOO"/>
              <filteredDestination selector="even = 'no'" queue="BAR"/>
2.2. 1 Consumer is running on topic.demo     - topic.demo has 1 consumer
2.3. A producer publishes two messages with selectors odd=yes and even=no.
2.4. Both messages are filtered and the one with odd=yes goes in FOO and
even=on goes in BAR
2.5. Consumer doesn't receives nothing.

I want the queues to act as consumers and should get only the messages which
belong to them from the topic but the consumers running on the topic should
receive a copy of all messages posted in the topic.

Can somebody help on how to achieve this? In a system where each message is
important and we have multiple consumers consuming that same message we need
to persist the messages somewhere for recovery for which the messages should
be consumed by consumers as well as should get enqueued in their respective
filtereddestination queues.

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message