Skip to content

Commit

Permalink
Converted optional parameter in RabbitMQTransport constructor to an o…
Browse files Browse the repository at this point in the history
…verload where parameter is required
  • Loading branch information
abparticular committed Dec 18, 2024
1 parent 524ab57 commit 482e061
Showing 1 changed file with 24 additions and 3 deletions.
27 changes: 24 additions & 3 deletions src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,23 @@ public class RabbitMQTransport : TransportDefinition

readonly List<(string hostName, int port, bool useTls)> additionalClusterNodes = [];

/// <summary>
/// Creates a new instance of the RabbitMQ transport.
/// </summary>
/// <param name="routingTopology">The routing topology to use.</param>
/// <param name="connectionString">The connection string to use when connecting to the broker.</param>
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString)
: this(routingTopology, connectionString, null)
{
}

/// <summary>
/// Creates a new instance of the RabbitMQ transport.
/// </summary>
/// <param name="routingTopology">The routing topology to use.</param>
/// <param name="connectionString">The connection string to use when connecting to the broker.</param>
/// <param name="managementConnectionString">The connection string to use when connecting to the management API</param>
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString, string managementConnectionString = null)
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString, string managementConnectionString)
: base(TransportTransactionMode.ReceiveOnly,
supportsDelayedDelivery: true,
supportsPublishSubscribe: true,
Expand All @@ -53,9 +63,20 @@ public RabbitMQTransport(RoutingTopology routingTopology, string connectionStrin
/// </summary>
/// <param name="routingTopology">The routing topology to use.</param>
/// <param name="connectionString">The connection string to use when connecting to the broker.</param>
/// <param name="managementConnectionString">The connection string to use when connecting to the management API</param>
/// <param name="enableDelayedDelivery">Should the delayed delivery infrastructure be created by the endpoint</param>
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString, bool enableDelayedDelivery, string managementConnectionString = null)
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString, bool enableDelayedDelivery)
: this(routingTopology, connectionString, enableDelayedDelivery, null)
{
}

/// <summary>
/// Creates a new instance of the RabbitMQ transport.
/// </summary>
/// <param name="routingTopology">The routing topology to use.</param>
/// <param name="connectionString">The connection string to use when connecting to the broker.</param>
/// <param name="enableDelayedDelivery">Should the delayed delivery infrastructure be created by the endpoint</param>
/// <param name="managementConnectionString">The connection string to use when connecting to the management API</param>
public RabbitMQTransport(RoutingTopology routingTopology, string connectionString, bool enableDelayedDelivery, string managementConnectionString)
: base(TransportTransactionMode.ReceiveOnly,
supportsDelayedDelivery: enableDelayedDelivery,
supportsPublishSubscribe: true,
Expand Down

0 comments on commit 482e061

Please sign in to comment.