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

Broker configured prefetch values are lost on failover reconnect

    XMLWordPrintableJSON

Details

    Description

      two brokers configured with the following policy:

       <policyEntry topic="FOO.>" topicPrefetch="10" />
      

      My consumer will failover to the other broker, if it is no longer there:

                  ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(user, password, "failover:tcp://xx:61666,tcp://xx:61667");
      

      When this subscription becomes active ( ant consumer -Dsubject=FOO.TEST -Dtopic=true -Dmax=100), I can see in jconsole that prefetch limit is indeed 10. When I kill the broker on 61666, the consumer failsover to 61667. Unfortunately, the prefetch limit has now changed to 32766.

      If one configures the consumer to set the prefetch limit:

      destination = session.createTopic(subject +"?consumer.prefetchSize=20");
      

      It works consistently, but not having control of consumers, it needs to be configurable broker side.

      Attachments

        Issue Links

          Activity

            People

              gtully Gary Tully
              gtully Gary Tully
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: