You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by jwenjian <we...@foxmail.com> on 2023/06/16 06:13:36 UTC

ActiveMQ Classic Network broker cluster unstable after one of the node reboot?

Hi,


I am currently setting up a ActiveMQ classic cluster using network broker by using statefulset of K8s with anti-affinity:


mq-0 is in node-0
mq-1 is in node-1
mq-2 is in node-2


the 3 mq are all connected each other, for example, I use below configuration for mq-0 in which activemq-1 / activemq-2 is the unique dns name pointing to other mq pod.


I don't use any persistant storage for messages, all the messages are in memory.


below is my destination policy config:


<destinationPolicy&gt;
   <policyMap&gt;
      <policyEntries&gt;
         <policyEntry queue="&gt;" producerFlowControl="true"&gt;
            <networkBridgeFilterFactory&gt;
              <conditionalNetworkBridgeFilterFactory replayWhenNoConsumers="true"/&gt;
            </networkBridgeFilterFactory&gt;
            <deadLetterStrategy&gt;
              <individualDeadLetterStrategy queuePrefix="DLQ." useQueueForQueueMessages="true" /&gt;
            </deadLetterStrategy&gt;
         </policyEntry&gt;
         <policyEntry topic="&gt;" producerFlowControl="true"&gt;
         </policyEntry&gt;
      </policyEntries&gt;
   </policyMap&gt;
</destinationPolicy&gt;



and my network connector config:


<networkConnectors&gt;
  <networkConnector conduitSubscriptions="false" networkTTL="60" prefetchSize="32766" decreaseNetworkConsumerPriority="false" name="SYSTEM0" uri="static:(tcp://activemq-1:61616,tcp://activemq-2:61616)"&gt;
</networkConnector&gt;
</networkConnectors&gt;

And my application connect to them with below failover url:


failover:(tcp://activemq-0:61616,tcp://activemq-1:61616,tcp://activemq-2:61616)?nested.wireFormat.maxInactivityDuration=3000&amp;nested.connectionTimeout=2000&amp;timeout=3000&amp;maxReconnectDelay=1000&amp;randomize=false



I set randomize to false to make clients connect to mq-0 when possible to reduce the complexity for usage/debug.


Every thing goes well until I reboot the node-0, on which the mq-0 holding all the client connection.


After the node-0 back online and mq-0 returns to normal, my application occasionally lose message from activemq, about 2 / 100 odds.


and mq-0 shows many warning message about:


warn: queue://<&gt; duplicate message ID: <&gt; null from cursor, is cursor audit disabled or too constrained? redirecting to dlq.


BTW, we start facing this issue on 5.17.2 and 5.18.1


Any idea on why this happened and how can I resolve this issue?


Thanks!


BR,
Wenjian