I can reproduce this consistently. I even created a bare bones stand-alone
java application listener that only logs the message contents to eliminate
any transactional variables. 

I start each java listener application in a new debug process and set a
breakpoint on the log statement (no JMS session is being shared). I use the
default KahaDB store and as mentioned before the problem happens even with a
single broker (there is no slave broker waiting for a free lock). 

To reproduce:

1) I push one message on a queue
2) Start 4 listeners. One listener picks it up and a breakpoint is hit on
the log output line
3) I start a shutdown sequence of the broker (Ctrl-C or issue shutdown
command from Hawtio)
4) All 3 other listener breakpoints get triggered simultaneously, each one
having deliveryCount incremented

These tests are being run in a 64Bit Windows 7 - Java SE 1.6.0_20. Haven't
tested in other environments yet.


Raul Kripalani-2 wrote
> Can you reproduce it consistently time after time? I wonder if this was a
> one-off case and you witnessed a race condition if all 3 competing
> consumers connected/handshook exactly at the same time.
> 
> Are they creating a new Session each, or are they sharing a single one?
> 
> Any JMS / XA transactions involved?
> 
> What store are you using? Shared KahaDB?
> 
> 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
> 
> On Mon, Mar 10, 2014 at 2:41 AM, gregg <

> garlakg@

> > wrote:
> 
>> Don't think that is possible because I have a breakpoint in each
>> consumer.
>> The delivery counter information was inspected when all consumers were
>> paused concurrently in a debug session during consumption. If I don't set
>> a
>> breakpoint I still get the same problem.
>>
>> Would have to do some more testing to change the way the message is
>> produced
>> to potentially isolate the cause.
>>
>>
>> artnaseef wrote
>> > Is it possible the listeners are rejecting the message?  That could
>> > explain the results you are seeing.
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://activemq.2283324.n4.nabble.com/Same-message-redelivered-to-multiple-consumers-after-failover-tp4678640p4678674.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>





--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Same-message-redelivered-to-multiple-consumers-after-failover-tp4678640p4678896.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to