activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <>
Subject Re: Selector and Virtual Topic
Date Wed, 07 Jan 2015 23:57:15 GMT
That's close.  Selectors can be terrible for performance.

The way ActiveMQ applies selectors is like this:

    WHILE ( message is NOT dispatched ) AND ( more consumers exist )
       IF selector matches
         DISPATCH message
       END IF

The problem for performance comes with large numbers of consumers with
distinct selectors.  In this case, dispatch of messages performs on the
order of O(n) - for every message - where "n" is the number of consumers. 
So, 1000 consumers in a worst-case-scenario will take about 1000 times
longer to get through this dispatch loop compared to 1 consumer.

Be careful with selectors.  They have been known to kill performance of a

With that said, the scenario described will work.  The queue and topic
subscribers have their own selectors and in no way compete for messages.

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

View raw message