I'm am using Virtual Destinations to implement Publish Subscribe model in ActiveMQ 5.15.13.
I've a virtual topic VirtualTopic and there are two queues bound to it. Each queue has it's own redelivery policy. Let's say Queue 1 will retry message 2 times in case there is an exception while processing the message and Queue 2 will retry message 3 times. Post retry message will be sent to deadletter queue.
I've observed that when a message is sent to VirtualTopic, it is delivered to both the queues.
I'm facing an issue where if the consumers of both queues are not able to process the message successfully. The message destined for Queue 1 is moved to deadletter queue after retrying for 2 times. My expectation is that message in Queue 2 would be deadlettered after 3 retries. But the message is retried to consumer of Queue 2 only for 2 times and then is stuck in Queue 2 as pending message.
There is no specific configuration I've done in activemq broker and the redelivery policy is applied programmatically. Is there any configuration I'm missing?