Gary Tully created AMQ-4235:
-------------------------------

             Summary: Broker configured prefetch values are lost on failover 
reconnect
                 Key: AMQ-4235
                 URL: https://issues.apache.org/jira/browse/AMQ-4235
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.7.0, 5.6.0
            Reporter: Gary Tully
            Assignee: Gary Tully
             Fix For: 5.8.0


two brokers configured with the following policy:

{code}
 <policyEntry topic="FOO.>" topicPrefetch="10" />
{code}

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

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

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:

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

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


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to