activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timothy Bish (JIRA)" <jira+amq...@apache.org>
Subject [jira] [Commented] (AMQNET-406) Messages for rollbacked transactions are dequeued
Date Fri, 01 Feb 2013 15:46:14 GMT

    [ https://issues.apache.org/jira/browse/AMQNET-406?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13568815#comment-13568815
] 

Timothy Bish commented on AMQNET-406:
-------------------------------------

That's not true in this case since the TransactionScope in the async callback is not linked
to anything its has no effect on message delivery.  You need to use sync consume with DTC
style transactions.
                
> 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

Mime
View raw message