You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by js...@apache.org on 2006/09/26 09:11:20 UTC
svn commit: r449933 - in
/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ:
MessageConsumer.cs Session.cs
Author: jstrachan
Date: Tue Sep 26 00:11:20 2006
New Revision: 449933
URL: http://svn.apache.org/viewvc?view=rev&rev=449933
Log:
patch applied by Rob Lugt (see http://www.nabble.com/Topic-consumer-appears-throttled-tf2318926.html#a6491196)
Modified:
incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageConsumer.cs
incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Session.cs
Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageConsumer.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageConsumer.cs?view=diff&rev=449933&r1=449932&r2=449933
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageConsumer.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/MessageConsumer.cs Tue Sep 26 00:11:20 2006
@@ -45,13 +45,13 @@
public event MessageListener Listener
{
- add {
- listener += value;
- FireAsyncDispatchOfMessages();
- }
- remove {
- listener -= value;
- }
+ add {
+ listener += value;
+ FireAsyncDispatchOfMessages();
+ }
+ remove {
+ listener -= value;
+ }
}
@@ -102,8 +102,8 @@
protected void FireAsyncDispatchOfMessages()
{
- // lets dispatch to the thread pool for this connection for messages to be processed
- ThreadPool.QueueUserWorkItem(new WaitCallback(session.DispatchAsyncMessages));
+ // lets dispatch to the thread pool for this connection for messages to be processed
+ ThreadPool.QueueUserWorkItem(new WaitCallback(session.DispatchAsyncMessages));
}
public IMessage Receive()
@@ -146,10 +146,9 @@
message = AutoAcknowledge(message);
listener(message);
}
- else
- {
- break;
- }
+
+ // lets now break to give the acknowledgement a chance to be processed
+ break;
}
}
Modified: incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Session.cs
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Session.cs?view=diff&rev=449933&r1=449932&r2=449933
==============================================================================
--- incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Session.cs (original)
+++ incubator/activemq/activemq-dotnet/trunk/src/main/csharp/ActiveMQ/Session.cs Tue Sep 26 00:11:20 2006
@@ -142,22 +142,22 @@
protected void CreateTemporaryDestination(ActiveMQDestination tempDestination)
{
- DestinationInfo command = new DestinationInfo();
- command.ConnectionId = connection.ConnectionId;
- command.OperationType = 0; // 0 is add
- command.Destination = tempDestination;
-
- connection.SyncRequest(command);
+ DestinationInfo command = new DestinationInfo();
+ command.ConnectionId = connection.ConnectionId;
+ command.OperationType = 0; // 0 is add
+ command.Destination = tempDestination;
+
+ connection.SyncRequest(command);
}
protected void DestroyTemporaryDestination(ActiveMQDestination tempDestination)
{
- DestinationInfo command = new DestinationInfo();
- command.ConnectionId = connection.ConnectionId;
- command.OperationType = 1; // 1 is remove
- command.Destination = tempDestination;
-
- connection.SyncRequest(command);
+ DestinationInfo command = new DestinationInfo();
+ command.ConnectionId = connection.ConnectionId;
+ command.OperationType = 1; // 1 is remove
+ command.Destination = tempDestination;
+
+ connection.SyncRequest(command);
}