https://issues.apache.org/jira/browse/AMQNET-471
Resolve issues around transaction rollback during normal operation or during a failure detected with the FailoverTransport handling reconnection. Issues involving false positives of duplicate redelivery and messages not being properly re-added to the unconsumed channel after rollback were fixed. Also added logic to attempt to detect delivery of rolled back messages to another consumer on the same connection which requires the TX be rolled back as invalid. Project: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/commit/c6595f25 Tree: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/tree/c6595f25 Diff: http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/diff/c6595f25 Branch: refs/heads/1.6.x Commit: c6595f25b7bd0daf3a5ffc6ac617d946b687926e Parents: 22fbad2 Author: Timothy A. Bish <tab...@apache.org> Authored: Thu Aug 28 15:54:34 2014 +0000 Committer: Timothy A. Bish <tab...@apache.org> Committed: Thu Aug 28 15:54:34 2014 +0000 ---------------------------------------------------------------------- src/main/csharp/Commands/MessageDispatch.cs | 14 + src/main/csharp/Connection.cs | 3083 +++++++-------- src/main/csharp/MessageConsumer.cs | 3556 +++++++++--------- src/main/csharp/Session.cs | 141 +- src/main/csharp/TransactionContext.cs | 78 +- .../csharp/Util/FifoMessageDispatchChannel.cs | 46 +- src/main/csharp/Util/MessageDispatchChannel.cs | 6 +- .../SimplePriorityMessageDispatchChannel.cs | 44 +- .../failover/FailoverTransactionTest.cs | 80 +- 9 files changed, 3623 insertions(+), 3425 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-nms-openwire/blob/c6595f25/src/main/csharp/Commands/MessageDispatch.cs ---------------------------------------------------------------------- diff --git a/src/main/csharp/Commands/MessageDispatch.cs b/src/main/csharp/Commands/MessageDispatch.cs index e292b28..c3a2846 100644 --- a/src/main/csharp/Commands/MessageDispatch.cs +++ b/src/main/csharp/Commands/MessageDispatch.cs @@ -35,6 +35,8 @@ namespace Apache.NMS.ActiveMQ.Commands public const byte ID_MESSAGEDISPATCH = 21; private Exception rollbackCause = null; + private long deliverySequenceId; + private object consumer; ConsumerId consumerId; ActiveMQDestination destination; @@ -75,6 +77,18 @@ namespace Apache.NMS.ActiveMQ.Commands set { this.rollbackCause = value; } } + public long DeliverySequenceId + { + get { return this.deliverySequenceId; } + set { this.deliverySequenceId = value; } + } + + public object Consumer + { + get { return this.consumer; } + set { this.consumer = value; } + } + public ConsumerId ConsumerId { get { return consumerId; }