You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2009/10/27 21:01:08 UTC
svn commit: r830320 - in
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp:
Commands/Message.cs MessageConsumer.cs
Author: tabish
Date: Tue Oct 27 20:01:08 2009
New Revision: 830320
URL: http://svn.apache.org/viewvc?rev=830320&view=rev
Log:
https://issues.apache.org/activemq/browse/AMQNET-176
Added call to OnMessageRollback method when a transaction is rollback to properly update the Message state.
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs?rev=830320&r1=830319&r2=830320&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/Commands/Message.cs Tue Oct 27 20:01:08 2009
@@ -166,6 +166,11 @@
this.ReadOnlyBody = true;
}
+ public virtual void OnMessageRollback()
+ {
+ this.redeliveryCounter++;
+ }
+
public bool IsExpired()
{
return this.expiration == 0 ? false : DateTime.UtcNow > DateUtils.ToDateTimeUtc(this.expiration);
Modified: activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs?rev=830320&r1=830319&r2=830320&view=diff
==============================================================================
--- activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs (original)
+++ activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs Tue Oct 27 20:01:08 2009
@@ -823,6 +823,12 @@
}
MessageId firstMsgId = this.dispatchedMessages.Last.Value.Message.MessageId;
+
+ foreach(MessageDispatch dispatch in this.dispatchedMessages)
+ {
+ // Allow the message to update its internal to reflect a Rollback.
+ dispatch.Message.OnMessageRollback();
+ }
//if(redeliveryPolicy.getMaximumRedeliveries() != RedeliveryPolicy.NO_MAXIMUM_REDELIVERIES
// && lastMd.getMessage().getRedeliveryCounter() > redeliveryPolicy.getMaximumRedeliveries()) {