Camel AMQP durable subscriber lose messages if connected broker shutdown and failover to other broker in broker cluster.
The issue occurs in Camel version 3.20.1.redhat-00078 and the same test setup did not loose message when using Camel version 3.18.3.redhat-00035.
The test steps:
1. A broker cluster is deployed on Openshift consists of 2 broker pods;
2. A simple OCP service/route was created for the two broker pods so a client can reconnect to the other broker if one broker in the cluster fails;
3. Two durable subscribers were connected to the broker cluster through the simple service/route to a topic;
4. Once the two durable subscribers had connected then shut them down;
5. A publisher publishes 10000 message with 1.5 MB payload to the topic;
6. After the publisher finished publishing 10000 messages, start the two durable subscribers to consume messages from the topic on the broker cluster;
7. start a script to periodically delete one of the pods to force the two subscribers to reconnect to the other pod via the simple service/route;
8. After finished consuming all messages, check the log file and calculate number of messages shown in the log file to determine how many messages had been consumed or lost.