[
https://issues.apache.org/jira/browse/AMQ-5672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14482191#comment-14482191
]
Christian Posta commented on AMQ-5672:
--------------------------------------
This commit adds a few new features to the selector caching that was previously
available:
#1 JMX introspection -- you can view and manage the selectors currently applied
to specific destinations/Queues. There are three JMX operations that can be
applied:
* selectorsForDestination(destinationName)
* deleteSelectorForDestination(destinationName, selector)
* deleteAllSelectorsForDestination(destinationName)
Just note, when passing in values to these operations, you need to prefix the
destination/queue name with "queue://" + queueName
#2 Enforce single selector for a destination -- the assumption is that only a
single valid selector expression can be enabled at any one time, and the last
consumer to attach with an expression overrides any existing expressions. The
one exception is that a consumer with NO selector does not count against the
"single selector" enforcement.. that is, you can have a single selector and
consumers with no selectors attached at the same time. To enable this feature,
you add the "singleSelectorsPerDestination=true" attribute to the
<virtualSelectorCacheBrokerPlugin> plugin element. When consumers that had a
selector disconnect from the broker, the broker will cache the selector as
expected. If a consumer that has NO selector (that is, it matches everything)
disconnects when this singleSelectorsPerDestination=true, then the queue will
NO LONGER match against everything.
#3 Exclusion of wildcard selectors -- any selectors that match on % or _ can be
excluded. To enable this feature, you add the "ignoreWildcardSelectors=true"
attribute to the <virtualSelectorCacheBrokerPlugin> plugin element.
> Add an option to virtual topic selector cache to enforce only a single
> selector at a given time
> -----------------------------------------------------------------------------------------------
>
> Key: AMQ-5672
> URL: https://issues.apache.org/jira/browse/AMQ-5672
> Project: ActiveMQ
> Issue Type: Improvement
> Components: Broker
> Affects Versions: 5.11.1
> Reporter: Christian Posta
> Assignee: Christian Posta
> Fix For: 5.12.0
>
>
> At the moment, the virtualTopicSelectorCache is pretty bare bones. we should
> allow configuration of the persist period, the file location, and some
> operational insight via JMX. We should also allow to configure the cache to a
> single number of selectors to enforce automatic clean-up for non-used
> selectors (and avoid large pileups of messages) and to ensure consistent
> usage across the queues that are used in the virtual topic.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)