Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/api/ConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public sealed class ConnectionFactory : ConnectionFactoryBase, IAsyncConnectionF
/// </summary>
/// <remarks>For concurrency greater than one this removes the guarantee that consumers handle messages in the order they receive them.
/// In addition to that consumers need to be thread/concurrency safe.</remarks>
public int ProcessingConcurrency { get; set; } = 1;
public int ConsumerDispatchConcurrency { get; set; } = 1;

/// <summary>The host to connect to.</summary>
public string HostName { get; set; } = "localhost";
Expand Down
2 changes: 1 addition & 1 deletion projects/RabbitMQ.Client/client/api/IConnectionFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,6 @@ public interface IConnectionFactory
/// </summary>
/// <remarks>For concurrency greater than one this removes the guarantee that consumers handle messages in the order they receive them.
/// In addition to that consumers need to be thread/concurrency safe.</remarks>
int ProcessingConcurrency { get; set; }
int ConsumerDispatchConcurrency { get; set; }
}
}
4 changes: 2 additions & 2 deletions projects/RabbitMQ.Client/client/impl/Connection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ public Connection(IConnectionFactory factory, bool insist, IFrameHandler frameHa

if (factory is IAsyncConnectionFactory asyncConnectionFactory && asyncConnectionFactory.DispatchConsumersAsync)
{
ConsumerWorkService = new AsyncConsumerWorkService(factory.ProcessingConcurrency);
ConsumerWorkService = new AsyncConsumerWorkService(factory.ConsumerDispatchConcurrency);
}
else
{
ConsumerWorkService = new ConsumerWorkService(factory.ProcessingConcurrency);
ConsumerWorkService = new ConsumerWorkService(factory.ConsumerDispatchConcurrency);
}

_sessionManager = new SessionManager(this, 0);
Expand Down
4 changes: 2 additions & 2 deletions projects/Unit/APIApproval.Approve.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ namespace RabbitMQ.Client
public bool AutomaticRecoveryEnabled { get; set; }
public System.Collections.Generic.IDictionary<string, object> ClientProperties { get; set; }
public string ClientProvidedName { get; set; }
public int ConsumerDispatchConcurrency { get; set; }
public System.TimeSpan ContinuationTimeout { get; set; }
public bool DispatchConsumersAsync { get; set; }
public RabbitMQ.Client.AmqpTcpEndpoint Endpoint { get; set; }
Expand All @@ -92,7 +93,6 @@ namespace RabbitMQ.Client
public System.TimeSpan NetworkRecoveryInterval { get; set; }
public string Password { get; set; }
public int Port { get; set; }
public int ProcessingConcurrency { get; set; }
public ushort RequestedChannelMax { get; set; }
public System.TimeSpan RequestedConnectionTimeout { get; set; }
public uint RequestedFrameMax { get; set; }
Expand Down Expand Up @@ -334,10 +334,10 @@ namespace RabbitMQ.Client
{
System.Collections.Generic.IDictionary<string, object> ClientProperties { get; set; }
string ClientProvidedName { get; set; }
int ConsumerDispatchConcurrency { get; set; }
System.TimeSpan ContinuationTimeout { get; set; }
System.TimeSpan HandshakeContinuationTimeout { get; set; }
string Password { get; set; }
int ProcessingConcurrency { get; set; }
ushort RequestedChannelMax { get; set; }
uint RequestedFrameMax { get; set; }
System.TimeSpan RequestedHeartbeat { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion projects/Unit/TestAsyncConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public void TestBasicRoundtrip()
[Test]
public async Task TestBasicRoundtripConcurrent()
{
var cf = new ConnectionFactory{ DispatchConsumersAsync = true, ProcessingConcurrency = 2 };
var cf = new ConnectionFactory{ DispatchConsumersAsync = true, ConsumerDispatchConcurrency = 2 };
using(IConnection c = cf.CreateConnection())
using(IModel m = c.CreateModel())
{
Expand Down
2 changes: 1 addition & 1 deletion projects/Unit/TestConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class TestConsumer
[Test]
public async Task TestBasicRoundtripConcurrent()
{
var cf = new ConnectionFactory{ ProcessingConcurrency = 2 };
var cf = new ConnectionFactory{ ConsumerDispatchConcurrency = 2 };
using(IConnection c = cf.CreateConnection())
using(IModel m = c.CreateModel())
{
Expand Down