activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oseymen <>
Subject Composite Queues - Losing Messages
Date Sun, 19 Jun 2011 16:59:00 GMT

Please see below and advise whether you want me to create JIRA for it. 

My setup: 
Producer -> Q.IN.DC1 (compositeQueue) -> DB.DC1 & SI.DC1 

I am losing messages in composite queues every time if: 
1. Producer sends persistent messages 
2. Producer is not using transactions 
3. Broker is using the failover transport to single broker 
3. Broker is killed in the middle 

I can replicate this every time I run this test: 
1. Start broker 
2. Start producer which starts sending 3000 persistent messages to Q.IN.DC1. 
3. Kill the broker (broker is running in console - I am just hitting close
in console) 
4. Restart broker 
5. Wait for 3000 messages to be forwarded. In the end you will see that one
of the queues has 3000 messages, the other has less messages (2997 in my
last run). 

My simple code, broker configuration and log file attached. 

In the log file attached, search for
ID:HAM-NB-073-58297-634440943864257972-1:0:1:1:270. This is the message id
that got dequeued from Q.IN.DC1, enqueued in DB.DC1 and never got to SI.DC1. 

Up until line 4845 everything is fine. Messages were forwarded to DB and SI
queues. In line 4845, message with ID 270 is sent to the broker. Broker
pushed the message in DB.DC1 but before it forwarded the message to SI.DC1,
broker got restarted. 

Jump to line 5395, now broker is restarted but it is suppressing the message
"suppressing duplicate message send

So message #270 got forwarded to DB.DC1 but never reached SI.DC1. Message
also does not exist in Q.IN.DC1, so it's lost. 

Am I missing something? I thought composite queues were forwarding messages
in an atomic operation and producer was supposed to get notified by the
broker if messages are not persisted properly. 

Because I am using failover transport, Send() waits until broker is live
again. No notifications or exceptions are thrown back to my code so that I
can try to resend the message.
activemq.xml Producer.cs 


View this message in context:
Sent from the ActiveMQ - Dev mailing list archive at

View raw message