Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.6.0, 5.7.0
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.