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 2014/07/16 22:51:15 UTC
svn commit: r1611182 -
/activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
Author: tabish
Date: Wed Jul 16 20:51:15 2014
New Revision: 1611182
URL: http://svn.apache.org/r1611182
Log:
https://issues.apache.org/jira/browse/AMQNET-484
Eagerly release consumers from transacted sessions if they don't have any pending acks to deliver so their prefetched messages are returned for dispatch right away.
Fixes [AMQNET-AMQNET-484]. (See https://issues.apache.org/jira/browse/AMQNET-AMQNET-484)
Modified:
activemq/activemq-dotnet/Apache.NMS.ActiveMQ/trunk/src/main/csharp/MessageConsumer.cs
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=1611182&r1=1611181&r2=1611182&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 Wed Jul 16 20:51:15 2014
@@ -434,7 +434,7 @@ namespace Apache.NMS.ActiveMQ
{
if(!this.unconsumedMessages.Closed)
{
- if(this.session.IsTransacted && this.session.TransactionContext.InTransaction)
+ if(this.dispatchedMessages.Count != 0 && this.session.IsTransacted && this.session.TransactionContext.InTransaction)
{
Tracer.DebugFormat("Consumer {0} Registering new ConsumerCloseSynchronization",
this.info.ConsumerId);
@@ -442,7 +442,7 @@ namespace Apache.NMS.ActiveMQ
}
else
{
- Tracer.DebugFormat("Consumer {0} No Active TX closing normally.",
+ Tracer.DebugFormat("Consumer {0} No Active TX or pending acks, closing normally.",
this.info.ConsumerId);
this.DoClose();
}