All redelivered messages have the same messageId key and the redeliveryCounter is incremented for each listener - ending at 3 because same message got redelivered to 3 listeners.
The problem seems to happen immediately after I terminate the running broker by sending CTRL-C in the running window. This redelivery happens during the Master broker shutdown sequence and before the slave broker even detects a freed lock.I can also reproduce this by sending the Terminate jvm(int) operation to the broker using Hawtio console. I can't reproduce the same behaviour when sending the Stop() operation however. So to summarize. This is not a failover related issue, but it still bugs me that messages got redelivered during broker shutdown sequence. Any ideas of why this is happening? Here is the output of the shutdown: INFO | Apache ActiveMQ 5.9.0 (localhost, ID:THINKTANK-65324-1394336317301-1:1) is shutting down INFO | Connector openwire stopped INFO | JobSchedulerStore:E:\apache-activemq-5.9.0\bin\..\data\localhost\scheduler stopped INFO | PListStore:[E:\apache-activemq-5.9.0\bin\..\data\localhost\tmp_storage] stopped INFO | Stopping async queue tasks INFO | Stopping async topic tasks INFO | Stopped KahaDB INFO | Apache ActiveMQ 5.9.0 (localhost, ID:THINKTANK-65324-1394336317301-1:1) uptime 1 minute INFO | Apache ActiveMQ 5.9.0 (localhost, ID:THINKTANK-65324-1394336317301-1:1) is shutdown INFO | Closing org.apache.activemq.xbean.XBeanBrokerFactory$1@1dc2481: startup date [Sat Mar 08 22:38:35 EST 2014]; root of context hierarchy INFO | Destroying Spring FrameworkServlet 'dispatcher' INFO | Destroying hawtio authentication filter artnaseef wrote > You are correct. The message should only dispatch to one of the three. > > One thing to check: are all three getting a msg with the same msg id and > with the JMSRedelivered flag set? > > Sent from my iPhone > >> On Mar 7, 2014, at 10:53 AM, "Raul Kripalani-2 [via ActiveMQ]" < > ml-node+s2283324n4678647h5@.nabble > > wrote: >> >> Hi Gary, >> >> On Fri, Mar 7, 2014 at 4:41 PM, Gary Tully <[hidden email]> wrote: >> >> > that is expected. with the caveat that you would need to repeat a few >> > times to get it delivered to all the consumers. >> > >> >> Why is this? If I understood correctly, the OP reported that the same >> message on a queue got redelivered to *all consumers* on that queue, i.e. >> AMQ followed the publish-subscribe behaviour rather than the >> point-to-point >> behaviour. >> >> If there are multiple consumers there is no guarantee that the same >> > consumer gets the messages the next time. >> >> >> Agreed; but why is the message redelivered to *all* other consumers >> instead >> of the broker picking one (i.e. competing consumers)? >> >> Apologies if I misunderstood something ;-) >> >> Regards, >> >> *Raúl Kripalani* >> Apache Camel PMC Member & Committer | Enterprise Architect, Open Source >> Integration specialist >> http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani >> http://blog.raulkr.net | twitter: @raulvk >> >> >> If you reply to this email, your message will be added to the discussion >> below: >> http://activemq.2283324.n4.nabble.com/Same-message-redelivered-to-multiple-consumers-after-failover-tp4678640p4678647.html >> To start a new topic under ActiveMQ - User, email > ml-node+s2283324n2341805h3@.nabble > >> To unsubscribe from ActiveMQ - User, click here. >> NAML -- View this message in context: http://activemq.2283324.n4.nabble.com/Same-message-redelivered-to-multiple-consumers-after-failover-tp4678640p4678663.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.