activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] Created: (AMQ-2779) Propagate queue subscription selectors to virtual topic dispatch such that unmatched messages do not pile up on subscription queues
Date Mon, 14 Jun 2010 16:25:51 GMT
Propagate queue subscription selectors to virtual topic dispatch such that unmatched messages
do not pile up on subscription queues
-----------------------------------------------------------------------------------------------------------------------------------

                 Key: AMQ-2779
                 URL: https://issues.apache.org/activemq/browse/AMQ-2779
             Project: ActiveMQ
          Issue Type: New Feature
          Components: Selector
    Affects Versions: 5.3.2
         Environment: all
            Reporter: Gary Tully
            Assignee: Gary Tully
             Fix For: 5.4.0


With virtual topics each consumer can get its own queue or share an existing queue. http://activemq.apache.org/virtual-destinations.html

Consumers which share a queue, can use selectors to partition the consumer queue but individual
consumers that use selectors run into a problem in that the dispatch to the queue does not
take account of the selector and all messages are dispatched to the queue. Over time, the
unmatched messages build up on the queue.
Through static configuration it is possible to arrange that the destination queues are filtered,
but this solution is static.

An alternative approach, that does impose a cpu hit during dispatch (as the selectors are
executed twice) can provide a neat solution. Making a virtual topic selectorAware allows the
destination interceptor to only dispatch messages that match the selector of one of the existing
subscriptions. In this way, no unmatched messages will be dispatched to the subscription queues.
In xml configuration, the following will make all topic dispatch respect the selectors of
the existing subscriptions:{code}
<broker xmlns="http://activemq.apache.org/schema/core">
    <destinationInterceptors>
      <virtualDestinationInterceptor>
        <virtualDestinations>
          <virtualTopic name=">" selectorAware="true"/>
        </virtualDestinations>
      </virtualDestinationInterceptor>
    </destinationInterceptors>

  </broker>{code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message