You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Remo Gloor (JIRA)" <ji...@apache.org> on 2013/02/01 16:24:13 UTC

[jira] [Created] (AMQNET-406) Messages for rollbacked transactions are dequeued

Remo Gloor created AMQNET-406:
---------------------------------

             Summary: Messages for rollbacked transactions are dequeued
                 Key: AMQNET-406
                 URL: https://issues.apache.org/jira/browse/AMQNET-406
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ
            Reporter: Remo Gloor
            Assignee: Jim Gomes


When a transaction scope is not Completed then the message should not be dequeued. In this case the message should be rollback and retried.

This little program shouldn't dequeue any message and the message should end in the DLQ:

            static void Main()
            {
                using (var connection = CreateConnectionFactory().CreateNetTxConnection())
                using (var session = connection.CreateSession())
                using (var consumer = session.CreateConsumer(session.GetQueue("test")))
                {
                    connection.Start();
                    consumer.Listener += OnMessage;
                    Console.ReadKey();
                }
            }

        private static void OnMessage(IMessage message)
        {
            using (var tx = new TransactionScope())
            {
            }
        }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira