Class SubQueueSelectorCacheBroker

  • All Implemented Interfaces:
    Runnable, Broker, Region, Service

    public class SubQueueSelectorCacheBroker
    extends BrokerFilter
    implements Runnable
    A plugin which allows the caching of the selector from a subscription queue.

    This stops the build-up of unwanted messages, especially when consumers may disconnect from time to time when using virtual destinations.

    This is influenced by code snippets developed by Maciej Rakowicz Refer to: https://issues.apache.org/activemq/browse/AMQ-3004 http://mail-archives.apache.org/mod_mbox/activemq-users/201011.mbox/%3C8A013711-2613-450A-A487-379E784AF1D6@homeaway.co.uk%3E

    • Constructor Detail

      • SubQueueSelectorCacheBroker

        public SubQueueSelectorCacheBroker​(Broker next,
                                           File persistFile)
        Constructor
    • Method Detail

      • run

        public void run()
        Persist the selector cache every MAX_PERSIST_INTERVALms.
        Specified by:
        run in interface Runnable
        See Also:
        Runnable.run()
      • isSingleSelectorPerDestination

        public boolean isSingleSelectorPerDestination()
      • setSingleSelectorPerDestination

        public void setSingleSelectorPerDestination​(boolean singleSelectorPerDestination)
      • getSelectorsForDestination

        public Set<String> getSelectorsForDestination​(String destinationName)
      • getPersistInterval

        public long getPersistInterval()
      • setPersistInterval

        public void setPersistInterval​(long persistInterval)
      • deleteSelectorForDestination

        public boolean deleteSelectorForDestination​(String destinationName,
                                                    String selector)
      • deleteAllSelectorsForDestination

        public boolean deleteAllSelectorsForDestination​(String destinationName)
      • isIgnoreWildcardSelectors

        public boolean isIgnoreWildcardSelectors()
      • setIgnoreWildcardSelectors

        public void setIgnoreWildcardSelectors​(boolean ignoreWildcardSelectors)