activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakub Korab <>
Subject Re: Messages are sent to all Queues instead of specific queues in Virtual Topic
Date Wed, 11 Jul 2012 15:50:33 GMT
Rather than filtering on the client side using selectors (which leave
messages behind in the queues) you can filter inside the broker at the
virtual destination itself. That way only messages that apply get placed on
the queue to begin with:

          <compositeQueue name="orders">
              <filteredDestination selector="odd = 'yes'"
              <filteredDestination selector="odd = 'no'"

The only thing that I would add is that there is a quirk around when those
queues get created - off the top of my head it is when a client first
connects to consume messages from them. Fortunately, you can get around it
by defining the queues up front in a destinations block

      <queue physicalName="orders.odd" />
      <queue physicalName="orders.even" />

Hope that helps.


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

View raw message