You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Andreas Mattes (JIRA)" <ji...@apache.org> on 2012/08/04 01:57:02 UTC
[jira] [Created] (AMQ-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Andreas Mattes created AMQ-3961:
-----------------------------------
Summary: Durable subscriber only receives part of the persisted messages on re-connect
Key: AMQ-3961
URL: https://issues.apache.org/jira/browse/AMQ-3961
Project: ActiveMQ
Issue Type: Bug
Components: Connector
Affects Versions: 5.6.0
Environment: Default configuraton of ActiveMQ under Linux or Windows
Reporter: Andreas Mattes
A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Andreas Mattes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428578#comment-13428578 ]
Andreas Mattes commented on AMQ-3961:
-------------------------------------
I'll try to create a reasonable unit test, but first I have to do some further investigation in order to emulate environment and communication correctly.
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Attachments: PrefetchSubscription.patch
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13428480#comment-13428480 ]
Timothy Bish commented on AMQ-3961:
-----------------------------------
A good course of action here would be to create a JUnit test case that shows the issue and a patch that resolves it, this will ensure it stays fixed into the future.
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQ-3961.
-------------------------------
Resolution: Fixed
Fix Version/s: 5.7.0
Assignee: Timothy Bish
Updated the TestClient test app to a JUnit based test case and applied the fix, good catch.
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Assignee: Timothy Bish
> Fix For: 5.7.0
>
> Attachments: PrefetchSubscription.patch, PrefetchSubscriptionTest.java, TestClient.java
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Andreas Mattes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Mattes updated AMQ-3961:
--------------------------------
Attachment: PrefetchSubscription.patch
The attached file "PrefetchSubscription.patch" contains a tentative fix for this issue.
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Attachments: PrefetchSubscription.patch
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Andreas Mattes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Mattes updated AMQ-3961:
--------------------------------
Attachment: PrefetchSubscription.patch
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Attachments: PrefetchSubscription.patch, PrefetchSubscriptionTest.java, TestClient.java
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Andreas Mattes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Mattes updated AMQ-3961:
--------------------------------
Attachment: TestClient.java
PrefetchSubscriptionTest.java
Find attached the following two tests demonstrating the issue:
# "PrefetchSubscriptionTest.java" contains a unit test which re-plays the interaction with the "DurableTopicSubscription" which leads to the issue with undispatched messages. Collaborating classes are partly mocked and simplified (e.g. transactions).
# "TestClient.java" is implemented as JUnit TestCase, but not a unit test and requires an ActiveMQ server to be running at "tcp://localhost:61616". It shows the issue from JMS API level.
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Attachments: PrefetchSubscription.patch, PrefetchSubscriptionTest.java, TestClient.java
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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-3961) Durable subscriber only receives part
of the persisted messages on re-connect
Posted by "Andreas Mattes (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andreas Mattes updated AMQ-3961:
--------------------------------
Attachment: (was: PrefetchSubscription.patch)
> Durable subscriber only receives part of the persisted messages on re-connect
> -----------------------------------------------------------------------------
>
> Key: AMQ-3961
> URL: https://issues.apache.org/jira/browse/AMQ-3961
> Project: ActiveMQ
> Issue Type: Bug
> Components: Connector
> Affects Versions: 5.6.0
> Environment: Default configuraton of ActiveMQ under Linux or Windows
> Reporter: Andreas Mattes
> Attachments: PrefetchSubscription.patch, PrefetchSubscriptionTest.java, TestClient.java
>
>
> A durable subscriber is connected to ActiveMQ using the ConnectionConsumer protocol, transacted sessions, and at most 1 message per session. While the subscriber is disconnected, the publisher publishes e.g. 10 messages. When the subscriber re-connects, it only receives 2 messages of those. If it repeatedly disconnects and re-connects, it receives 2 messages each time until all messages are received.
> Further investigation reveals that the problem lies in class org.apache.activemq.broker.region.PrefetchSubscription which does not re-check for further pending messages to be dispatched when committed message are removed from the list of dispatched but not yet acknowledged messages.
--
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