activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dejan Bosanac <de...@nighttale.net>
Subject Re: Composite Queues - Losing Messages
Date Mon, 20 Jun 2011 11:16:43 GMT
Please raise a Jira. Also, a test case would help.


Regards
-- 
Dejan Bosanac - http://twitter.com/dejanb
-----------------
The experts in open source integration and messaging - http://fusesource.com
ActiveMQ in Action - http://www.manning.com/snyder/
Blog - http://www.nighttale.net


On Sun, Jun 19, 2011 at 6:59 PM, oseymen <ozan.seymen@tdpg.com> wrote:

> Hi,
>
> 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
> saying:
> "suppressing duplicate message send
> [ID:HAM-NB-073-58297-634440943864257972-1:0:1:1:270]".
>
> 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.
>
> http://activemq.2283324.n4.nabble.com/file/n3609565/activemq.log.txt.zip
> activemq.log.txt.zip
> http://activemq.2283324.n4.nabble.com/file/n3609565/activemq.xml
> activemq.xml
> http://activemq.2283324.n4.nabble.com/file/n3609565/Producer.csProducer.cs
>
> Regards,
> Ozan
>
> --
> View this message in context:
> http://activemq.2283324.n4.nabble.com/Composite-Queues-Losing-Messages-tp3609565p3609565.html
> Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message