You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org> on 2010/03/26 19:58:27 UTC
[jira] Created: (QPID-2471) Java client releases messages in an
unpredictable order on recover
Java client releases messages in an unpredictable order on recover
------------------------------------------------------------------
Key: QPID-2471
URL: https://issues.apache.org/jira/browse/QPID-2471
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: 0.6
Reporter: Rajith Attapattu
Assignee: Rajith Attapattu
Fix For: 0.7
As per the JMS spec, If "recover" is called on a session, the client should stop message delivery for that session, and restarts message delivery with the oldest unacknowledged message.
It also says that "Redelivered messages do not have to be delivered in exactly their original delivery order".
However it's nice to ensure ordering where possible.
Looking at the code (alteast the 0-10 codepath) it seems we are not making a reasonable effort in ensuring we release all messages when in prefetch mode.
Quite often messages are stuck in the pre-delivery dispatch queue or the individual consumer queues.
This results in the messages being delivered out of order.
Here the steps that would need to do to ensure recovery is done properly and if possible to ensure ordering.
------------------------------------------------------------------------------------------------------------------------------------------------
1. Flush any message acks kept in buffer.
2. Stop the message flow.
3. Drain the dispatch queue and the queues in each consumer
4. Reject/release all unacked messages.
5. Start the message flow again.
It is also nice to have a test case to ensure that ordering is maintained under reasonable circumstances.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] Updated: (QPID-2471) Java client releases messages in an
unpredictable order on recover
Posted by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu updated QPID-2471:
-----------------------------------
Attachment: QPID-2471.patch
This patch contains a fix for the problem described in the JIRA.
The patch passes the RecoverTest for the C++ Broker.
However it fails with the Java broker. The failures are random and are due to messages not arriving on time.
I am yet to investigate the issues around this.
Once the issues are resolved I will be checking in two other test cases for recover that tests the problem described in the JIRA.
> Java client releases messages in an unpredictable order on recover
> ------------------------------------------------------------------
>
> Key: QPID-2471
> URL: https://issues.apache.org/jira/browse/QPID-2471
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.6
> Reporter: Rajith Attapattu
> Assignee: Rajith Attapattu
> Fix For: 0.7
>
> Attachments: QPID-2471.patch
>
>
> As per the JMS spec, If "recover" is called on a session, the client should stop message delivery for that session, and restarts message delivery with the oldest unacknowledged message.
> It also says that "Redelivered messages do not have to be delivered in exactly their original delivery order".
> However it's nice to ensure ordering where possible.
> Looking at the code (alteast the 0-10 codepath) it seems we are not making a reasonable effort in ensuring we release all messages when in prefetch mode.
> Quite often messages are stuck in the pre-delivery dispatch queue or the individual consumer queues.
> This results in the messages being delivered out of order.
> Here the steps that would need to do to ensure recovery is done properly and if possible to ensure ordering.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> 1. Flush any message acks kept in buffer.
> 2. Stop the message flow.
> 3. Drain the dispatch queue and the queues in each consumer
> 4. Reject/release all unacked messages.
> 5. Start the message flow again.
> It is also nice to have a test case to ensure that ordering is maintained under reasonable circumstances.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] Updated: (QPID-2471) Java client releases messages in an
unpredictable order on recover
Posted by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu updated QPID-2471:
-----------------------------------
Attachment: QPID-2471.patch
This patch contains a fix for the problem described in the JIRA.
I haven't fully tested/implemented it in the 0-8 path and is grateful if somebody who is more familiar with the 0-8 side steps in do a review.
I will be attaching too test cases shortly.
> Java client releases messages in an unpredictable order on recover
> ------------------------------------------------------------------
>
> Key: QPID-2471
> URL: https://issues.apache.org/jira/browse/QPID-2471
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.6
> Reporter: Rajith Attapattu
> Assignee: Rajith Attapattu
> Fix For: 0.7
>
> Attachments: QPID-2471.patch
>
>
> As per the JMS spec, If "recover" is called on a session, the client should stop message delivery for that session, and restarts message delivery with the oldest unacknowledged message.
> It also says that "Redelivered messages do not have to be delivered in exactly their original delivery order".
> However it's nice to ensure ordering where possible.
> Looking at the code (alteast the 0-10 codepath) it seems we are not making a reasonable effort in ensuring we release all messages when in prefetch mode.
> Quite often messages are stuck in the pre-delivery dispatch queue or the individual consumer queues.
> This results in the messages being delivered out of order.
> Here the steps that would need to do to ensure recovery is done properly and if possible to ensure ordering.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> 1. Flush any message acks kept in buffer.
> 2. Stop the message flow.
> 3. Drain the dispatch queue and the queues in each consumer
> 4. Reject/release all unacked messages.
> 5. Start the message flow again.
> It is also nice to have a test case to ensure that ordering is maintained under reasonable circumstances.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] Updated: (QPID-2471) Java client releases messages in an
unpredictable order on recover
Posted by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu updated QPID-2471:
-----------------------------------
Attachment: (was: QPID-2471.patch)
> Java client releases messages in an unpredictable order on recover
> ------------------------------------------------------------------
>
> Key: QPID-2471
> URL: https://issues.apache.org/jira/browse/QPID-2471
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.6
> Reporter: Rajith Attapattu
> Assignee: Rajith Attapattu
> Fix For: 0.7
>
>
> As per the JMS spec, If "recover" is called on a session, the client should stop message delivery for that session, and restarts message delivery with the oldest unacknowledged message.
> It also says that "Redelivered messages do not have to be delivered in exactly their original delivery order".
> However it's nice to ensure ordering where possible.
> Looking at the code (alteast the 0-10 codepath) it seems we are not making a reasonable effort in ensuring we release all messages when in prefetch mode.
> Quite often messages are stuck in the pre-delivery dispatch queue or the individual consumer queues.
> This results in the messages being delivered out of order.
> Here the steps that would need to do to ensure recovery is done properly and if possible to ensure ordering.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> 1. Flush any message acks kept in buffer.
> 2. Stop the message flow.
> 3. Drain the dispatch queue and the queues in each consumer
> 4. Reject/release all unacked messages.
> 5. Start the message flow again.
> It is also nice to have a test case to ensure that ordering is maintained under reasonable circumstances.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org
[jira] Updated: (QPID-2471) Java client releases messages in an
unpredictable order on recover
Posted by "Rajith Attapattu (JIRA)" <qp...@incubator.apache.org>.
[ https://issues.apache.org/jira/browse/QPID-2471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu updated QPID-2471:
-----------------------------------
Comment: was deleted
(was: This patch contains a fix for the problem described in the JIRA.
I haven't fully tested/implemented it in the 0-8 path and is grateful if somebody who is more familiar with the 0-8 side steps in do a review.
I will be attaching too test cases shortly.)
> Java client releases messages in an unpredictable order on recover
> ------------------------------------------------------------------
>
> Key: QPID-2471
> URL: https://issues.apache.org/jira/browse/QPID-2471
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.6
> Reporter: Rajith Attapattu
> Assignee: Rajith Attapattu
> Fix For: 0.7
>
>
> As per the JMS spec, If "recover" is called on a session, the client should stop message delivery for that session, and restarts message delivery with the oldest unacknowledged message.
> It also says that "Redelivered messages do not have to be delivered in exactly their original delivery order".
> However it's nice to ensure ordering where possible.
> Looking at the code (alteast the 0-10 codepath) it seems we are not making a reasonable effort in ensuring we release all messages when in prefetch mode.
> Quite often messages are stuck in the pre-delivery dispatch queue or the individual consumer queues.
> This results in the messages being delivered out of order.
> Here the steps that would need to do to ensure recovery is done properly and if possible to ensure ordering.
> ------------------------------------------------------------------------------------------------------------------------------------------------
> 1. Flush any message acks kept in buffer.
> 2. Stop the message flow.
> 3. Drain the dispatch queue and the queues in each consumer
> 4. Reject/release all unacked messages.
> 5. Start the message flow again.
> It is also nice to have a test case to ensure that ordering is maintained under reasonable circumstances.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org