You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Torsten Mielke (JIRA)" <ji...@apache.org> on 2008/08/19 22:03:52 UTC

[jira] Created: (AMQ-1897) Non-transactional and exclusive consumer may receive messages out-of-order.

Non-transactional and exclusive consumer may receive messages out-of-order.
---------------------------------------------------------------------------

                 Key: AMQ-1897
                 URL: https://issues.apache.org/activemq/browse/AMQ-1897
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.1.0
         Environment: Environment: 
  * ActiveMQ 5.1.0
  * one broker using direct jdbc persistence (mysql)
  * transacted producer
  * non-transacted consumer!
  * 3 consumers but all configured for exclusive consumer
  * 1 producer that publishes msgs faster than consumers 
  * consumer using SESSION.AUTO_ACKNOWLEDGE

            Reporter: Torsten Mielke
            Priority: Critical


With an env as described above it is possible to violate the exclusive consumer limitation. Initially with all three consumers being started and the producer sending messages, the exclusive consumer feature works fine. 
However if you kill and restart each consumer in a row, allowing another consumer to take over the exclusive right, you will eventually reach a state where a message that was already consumed by the previous exclusive consumer gets redelivered to the new exclusive consumer that has taken over the work. 
As consumers are non-transactional, they will autocommit every single message received, so each msgs gets deleted from the jdbc db sequentially. Hence if another exclusive consumer takes over it should only process messages >= the message number of the previous exclusive consumer. However this is not the case.

This bug is kind of related to AMQ-1896.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQ-1897) Non-transactional and exclusive consumer may receive messages out-of-order.

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

Torsten Mielke updated AMQ-1897:
--------------------------------

    Attachment: HelloWorldJMS_AMQ-1897.zip

Use testcase provided and follow steps in README_AMQ-1897.txt

> Non-transactional and exclusive consumer may receive messages out-of-order.
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-1897
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1897
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: Environment: 
>   * ActiveMQ 5.1.0
>   * one broker using direct jdbc persistence (mysql)
>   * transacted producer
>   * non-transacted consumer!
>   * 3 consumers but all configured for exclusive consumer
>   * 1 producer that publishes msgs faster than consumers 
>   * consumer using SESSION.AUTO_ACKNOWLEDGE
>            Reporter: Torsten Mielke
>            Priority: Critical
>         Attachments: HelloWorldJMS_AMQ-1897.zip
>
>
> With an env as described above it is possible to violate the exclusive consumer limitation. Initially with all three consumers being started and the producer sending messages, the exclusive consumer feature works fine. 
> However if you kill and restart each consumer in a row, allowing another consumer to take over the exclusive right, you will eventually reach a state where a message that was already consumed by the previous exclusive consumer gets redelivered to the new exclusive consumer that has taken over the work. 
> As consumers are non-transactional, they will autocommit every single message received, so each msgs gets deleted from the jdbc db sequentially. Hence if another exclusive consumer takes over it should only process messages >= the message number of the previous exclusive consumer. However this is not the case.
> This bug is kind of related to AMQ-1896.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQ-1897) Non-transactional and exclusive consumer may receive messages out-of-order.

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

Rob Davies resolved AMQ-1897.
-----------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 5.4.0)
                   5.3.0
         Assignee: Rob Davies

Reduce prefetch to zero - see http://activemq.apache.org/what-is-the-prefetch-limit-for.html

> Non-transactional and exclusive consumer may receive messages out-of-order.
> ---------------------------------------------------------------------------
>
>                 Key: AMQ-1897
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1897
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.1.0
>         Environment: Environment: 
>   * ActiveMQ 5.1.0
>   * one broker using direct jdbc persistence (mysql)
>   * transacted producer
>   * non-transacted consumer!
>   * 3 consumers but all configured for exclusive consumer
>   * 1 producer that publishes msgs faster than consumers 
>   * consumer using SESSION.AUTO_ACKNOWLEDGE
>            Reporter: Torsten Mielke
>            Assignee: Rob Davies
>            Priority: Critical
>             Fix For: 5.3.0
>
>         Attachments: HelloWorldJMS_AMQ-1897.zip
>
>
> With an env as described above it is possible to violate the exclusive consumer limitation. Initially with all three consumers being started and the producer sending messages, the exclusive consumer feature works fine. 
> However if you kill and restart each consumer in a row, allowing another consumer to take over the exclusive right, you will eventually reach a state where a message that was already consumed by the previous exclusive consumer gets redelivered to the new exclusive consumer that has taken over the work. 
> As consumers are non-transactional, they will autocommit every single message received, so each msgs gets deleted from the jdbc db sequentially. Hence if another exclusive consumer takes over it should only process messages >= the message number of the previous exclusive consumer. However this is not the case.
> This bug is kind of related to AMQ-1896.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.