Hi Team, We have cluster of Artemis servers with three active and three backup nodes. I know that it is not optimal configuration because of message redistribution between nodes, but we still plan to use it for some time.
There are some client applications with strange problem: when application tries to consume message and cannot handle it, it fails and message is backed out to queue. Then application connects randomly to another broker in the cluster, and failed message is redistributed to this node. After redistribution the message seems to become a new message with new message id, and delivery attempts count is also reset. So the message will never be backed out to DLQ because it's delivery attempts count cannot reach max-delivery-attempts. In this situation the consumer connects randomly to each node, tries to consume, fails, reconnects, and it is repeated indefinitely. We tried to make some workarounds: 1. Change connection string in the consumer application to connect to only one pair of servers (one active and one backup). Add useTopologyForLoadBalancing=false to the connection string. 2. Change max-delivery-attempts address setting to 1 to make message move to DLQ after first attempt. 3. Suggest developers to make application more robust (for example, not to fail connection when handling incorrect message). But it seems that the root cause of the problem is that we are using cluster, and message headers are reset when message is redistributed. Is it ok that the message gets new attributes after each redistribution? There is another problem of cluster configuration - _AMQ_VALIDATED_USER header is changed to the name of cluster user, and we cannot track which user has added the message. I also tried to use Connection Router, but faced some issues which I will describe later in another discussion. -- Best regards, Aleksandr ----------------------------------- This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient any use, distribution, copying or disclosure is strictly prohibited. If you have received this message in error, please notify the sender immediately either by telephone or by e-mail and delete this message and any attachment from your system. Correspondence via e-mail is for information purposes only. AO Raiffeisenbank neither makes nor accepts legally binding statements by e-mail unless otherwise agreed. -----------------------------------