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/06/21 17:06:43 UTC

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

Emil Kongelys created AMQ-3891:
----------------------------------

             Summary: 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.6.0, 5.5.1
            Reporter: Emil Kongelys
            Priority: Critical


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

       

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

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13421481#comment-13421481 ] 

Timothy Bish commented on AMQ-3891:
-----------------------------------

Recommend you try looking at the JUnit tests in the org.apache.activemq.bugs package and seeing if you can create something that reproduces your problem in test form, I'm not finding any issues here. 
                
> 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

       

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

Posted by "Claudio Corsi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398753#comment-13398753 ] 

Claudio Corsi commented on AMQ-3891:
------------------------------------

Can you include the client uri that you used and also the transport connector definition on the broker?

                
> 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
>
> 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

       

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

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398688#comment-13398688 ] 

Timothy Bish commented on AMQ-3891:
-----------------------------------

Recommend you try and create a JUnit test case that demonstrates the issues you are seeing.
                
> 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
>
> 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

       

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

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3891.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.7.0
         Assignee: Timothy Bish

Fixed in 5.7
                
> 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
>            Assignee: Timothy Bish
>            Priority: Critical
>             Fix For: 5.7.0
>
>         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

       

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

Posted by "Emil Kongelys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407896#comment-13407896 ] 

Emil Kongelys commented on AMQ-3891:
------------------------------------

Are you able to reproduce the issue, or do you need more information? I'm using NMS/C# and not java.

We have attached wireshark to confirm that the messages was sent from the AMQ broker, and it was not a problem in NMS.
                
> 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
>
> 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

       

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

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13420664#comment-13420664 ] 

Timothy Bish commented on AMQ-3891:
-----------------------------------

Recommend you test this against a 5.7-SNAPSHOT to as it might have been resolved with some other fixes that have gone in recently. 
                
> 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

       

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

Posted by "Emil Kongelys (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emil Kongelys updated AMQ-3891:
-------------------------------

    Attachment: Duplicates.java

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

       

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

Posted by "Emil Kongelys (JIRA)" <ji...@apache.org>.
    [ 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

       

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

Posted by "Emil Kongelys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13423738#comment-13423738 ] 

Emil Kongelys commented on AMQ-3891:
------------------------------------

The test app it self will not show an issue, you will only be able to see the issue in the admin web interface, where you can see messages beeing dispatched multible times.

Besides that this seems to be related to some of the other issues raised, so if the topic that the durable subscriber subcribs to is not configure in the config file the problem goes away.

It also do seem like the issue has been resolved in the 5.7 version, is there any info on when this version is in a stable release?

Thanks for your help, I belive that this issue can be closed now.
                
> 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

       

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

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407952#comment-13407952 ] 

Timothy Bish commented on AMQ-3891:
-----------------------------------

NMS doesn't have the duplicate suppression features that the Java client has so its probable that this is normal behavior.  We'd need a JUnit test case that reproduces the issue to show that its not just a limitation of the NMS client at play.  
                
> 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
>
> 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

       

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

Posted by "Emil Kongelys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3891?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398859#comment-13398859 ] 

Emil Kongelys commented on AMQ-3891:
------------------------------------

The client URI is "failover:(tcp://127.0.0.1:61616?wireFormat.tcpNoDelayEnabled=true&wireFormat.tightEncodingEnabled=false&wireFormat.cacheEnabled=false)?transport.randomize=false"

And the connector is set to: 
<transportConnector name="openwire" uri="nio://0.0.0.0:61616?wireFormat.tcpNoDelayEnabled=true&amp;wireFormat.tightEncodingEnabled=false&amp;wireFormat.cacheEnabled=false"/>
                
> 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
>
> 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