Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7312

virtualSelectorCacheBrokerPlugin fails on "browse" action

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.15.10
    • 5.15.11, 5.16.0
    • Broker
    • None
    • Patch Available

    Description

      We have a VirtualTopic "VirtualTopic.multi_dest" and 2 consumers :

      • Consumer.alpha.VirtualTopic.multi_dest
      • Consumer.beta.VirtualTopic.multi_dest

      Message producer send messages on that vTopic with various "tenant" header value.

      Each consumer use a selector to receive only desired data :

      • tenant='alpha' for Consumer.alpha.VirtualTopic.multi_dest
      • tenant='beta' for Consumer.beta.VirtualTopic.multi_dest

      To avoid to get many pending message on each consumer queue, we activated selectorAware="true" in broker settings.

      To avoid to lose message on temporary consumer deconnection, we activated virtualSelectorCacheBrokerPlugin plugin.

      Steps to reproduce bug :

      • launch message producer and both message consumers alpha and beta
      • stop alpha consumer
      • notice on console pending messages on alpha queue increase
      • if we restart alpha consumer, all pending messages are consumed => ok, only messages matching selector were in queue
      • restop alpha consumer
      • go on console and click on "Browse" link for alpha consumer queue
      • restart alpha consumer => it will consume pending messages matching selector
      • notice there are other waiting messages that do not match selector, so the consumer queue is fastly full of useless messages => ko
      • even after broker restart, the alpha consumer queue continues to receive message that do not match selectors => ko

       

      After code analysis, I notice "Browse" action create a new consumer on queue. In virtualSelectorCacheBrokerPlugin, the addConsumer method update "subSelectorCache" variable with 'TRUE' selector.

       

      A pull request is submitted to fix that issue (https://github.com/apache/activemq/pull/395), could you merge it for the next patch 5.15.11 ?

       

       

       

      Attachments

        Issue Links

          Activity

            People

              jbonofre Jean-Baptiste Onofré
              danlek Dany LECOQ
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m