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:

    • Constructor Detail

      • SubQueueSelectorCacheBroker

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

      • run

        public void run()
        Persist the selector cache every MAX_PERSIST_INTERVALms.
        Specified by:
        run in interface Runnable
        See Also:
      • 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)