Hi ,

I am using Active MQ 5.14.2 with spring boot  for developing a Pub Sub model
using Topic .

Following is the problem.:

1. Producer P1 fires an Event/Message M1 for subscriber S1 and S2.
 Subscriber S1 is fine and displayed the EnQueue and DeQueue of Message M1.
 But the Subsciber S2, because of a program exception retry to consume M1
since I have used 
 RedeliveryPolicy.
        policy.setMaximumRedeliveries(5);
        policy.setInitialRedeliveryDelay(1000);
        policy.setRedeliveryDelay(10000);

Now when the M1 is sent again and again for 5 times  with an iteration, the
Subscriber S2 is blocked for  subsequent Messages M2 and M3 which were
published after M1.

Is there a way that the subscriber S2 can consume M2 and M3 while the 5
redeliveries are happening for M1.What I have experienced is that the
Message M2 and M3 is blocked for Subscriber S2 till M1 goes to Dead Letter
Queue as a Poison Pill.
This simply makes my system slow.
Also, I have setDispatchAsync to  true but nothing changes.

      ActiveMQConnection connection = (ActiveMQConnection)
connectionFactory.createConnection();
        /* Create Session Acknowledgement         */
        connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
        connection.setDispatchAsync(true);
        connection.setUseAsyncSend(true);

Please let me know is there is a way to handle this scenario to prevent S2
waiting for Message M1 to die before it could consume M2 and M3.
 



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Topic-PubSub-Subscriber-Blocked-because-of-Fault-Exception-tp4727899.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.

Reply via email to