You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Emil Kongelys (JIRA)" <ji...@apache.org> on 2012/07/23 10:50:35 UTC

[jira] [Comment Edited] (AMQ-3891) Durable subscribers receiving duplicate messages

    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420508#comment-13420508 ] 

Emil Kongelys edited comment on AMQ-3891 at 7/23/12 8:50 AM:
-------------------------------------------------------------

Okay, I have gotten some help doing a JUnit. 

But just to be clear, this is not an issue of the client side, it's the message broker that has the problem. What we have found is that it's true that a java client using the Java api will not get the duplicated messages because the api will remove them.

What happens is if you start the JUnit attached, BEFORE the message broker is started, and then start the broker then the client will receive messages correctly.
If you then restart the JUnit, the client it self will not receive duplicates because of the Java api handling this, but if you look under connections in the admin web interface you'll see all messages is sent twice.

If you now restart the JUnit again, you'll see that all messages is dispatched 3 times, and if you restart again all messages wil be dispatched 4 times, and so on...


                
      was (Author: eko):
    Okay, I have gotten some help doing a JUnit. 

But just to be clear, this is not an issue of the client side, it's the message broker that has the problem. What we have found is that it's true that a java client using the Java api will not get the duplicated messages because the api will remove them.

What happens is if you start the JUnit attached, BEFORE the message broker is started then the client will receive messages correctly.
If you then restart the JUnit, the client it self will not receive duplicates because of the Java api handling this, but if you look under connections in the admin web interface you'll see all messages is sent twice.

If you now restart the JUnit again, you'll see that all messages is dispatched 3 times, and if you restart again all messages wil be dispatched 4 times, and so on...


                  
> Durable subscribers receiving duplicate messages
> ------------------------------------------------
>
>                 Key: AMQ-3891
>                 URL: https://issues.apache.org/jira/browse/AMQ-3891
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.1, 5.6.0
>            Reporter: Emil Kongelys
>            Priority: Critical
>         Attachments: Duplicates.java
>
>
> This is what it seems to take to reproduce this:
> •         The durable subscriber is connected to the message broker, using the failover protocol
> •         The message broker is then restarted (with the client running)
> •         The client application is then restarted
> o   The client now receives two copies of every message!
> •         Try restarting the client again
> o   The client now receives three copies of every message!
> •         And so on...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira