From 42dbd2c74fa016517daa1272521e1fa6abca4204 Mon Sep 17 00:00:00 2001 From: Brandon Ording Date: Wed, 5 Feb 2025 17:10:27 -0500 Subject: [PATCH] Always call VerifyRequirements on startup --- src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs | 1 + .../RabbitMQTransportInfrastructure.cs | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs index c582aa9b0..0978f8f97 100644 --- a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs +++ b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs @@ -232,6 +232,7 @@ public override async Task Initialize(HostSettings host var brokerVerifier = new BrokerVerifier(ManagementClient, ValidateDeliveryLimits); await brokerVerifier.Initialize(cancellationToken).ConfigureAwait(false); + await brokerVerifier.VerifyRequirements(cancellationToken).ConfigureAwait(false); var channelProvider = new ChannelProvider(connectionFactory, NetworkRecoveryInterval, RoutingTopology); await channelProvider.CreateConnection(cancellationToken).ConfigureAwait(false); diff --git a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransportInfrastructure.cs b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransportInfrastructure.cs index 49d9e160a..d5653ae4d 100644 --- a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransportInfrastructure.cs +++ b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransportInfrastructure.cs @@ -50,8 +50,6 @@ internal async Task SetupInfrastructure(string[] sendingQueues, CancellationToke { using var connection = await connectionFactory.CreateAdministrationConnection(cancellationToken).ConfigureAwait(false); - await brokerVerifier.VerifyRequirements(cancellationToken).ConfigureAwait(false); - using var channel = await connection.CreateChannelAsync(cancellationToken: cancellationToken).ConfigureAwait(false); if (supportsDelayedDelivery)