From 06a7da4e5e287206d4de3fa40a2bf13f9ffc3fd7 Mon Sep 17 00:00:00 2001 From: SzymonPobiega Date: Mon, 18 Nov 2024 10:18:10 +0100 Subject: [PATCH 1/3] Reword the API comment for customizing the transport message --- src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs index c10783eab..5455f7e6d 100644 --- a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs +++ b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs @@ -98,10 +98,10 @@ public TimeSpan TimeToWaitBeforeTriggeringCircuitBreaker /// /// /// - /// This customization is applied after any configured transport customizations, meaning that - /// any changes made here may override or conflict with previous transport-level adjustments. - /// Exercise caution, as modifying the message at this stage can lead to unintended behavior - /// downstream if the message structure or properties are altered in ways that do not align + /// When provided the customization is called after all other transport customizations configured, meaning that + /// any changes made by customization logic may override or conflict with previous transport-level adjustments. + /// This extension point should be used with caution, as modifying a native message at this stage can lead to unintended behavior + /// downstream if the message content or properties are altered in ways that do not align /// with expectations elsewhere in the system. /// /// From afdb53c3d2838f17f006a5ab2922d39ab5d05f35 Mon Sep 17 00:00:00 2001 From: SzymonPobiega Date: Mon, 18 Nov 2024 12:31:52 +0100 Subject: [PATCH 2/3] Try fix collection init problem --- .../BrokerConnectionBinder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NServiceBus.Transport.RabbitMQ.CommandLine/BrokerConnectionBinder.cs b/src/NServiceBus.Transport.RabbitMQ.CommandLine/BrokerConnectionBinder.cs index 9565339fe..581df4950 100644 --- a/src/NServiceBus.Transport.RabbitMQ.CommandLine/BrokerConnectionBinder.cs +++ b/src/NServiceBus.Transport.RabbitMQ.CommandLine/BrokerConnectionBinder.cs @@ -36,7 +36,7 @@ protected override BrokerConnection GetBoundValue(BindingContext bindingContext) certificateCollection.Add(certificate); } - var connectionFactory = new ConnectionFactory("rabbitmq-transport", connectionConfiguration, certificateCollection, disableCertificateValidation, useExternalAuth, TimeSpan.FromSeconds(60), TimeSpan.FromSeconds(10), new List<(string, int, bool)>()); + var connectionFactory = new ConnectionFactory("rabbitmq-transport", connectionConfiguration, certificateCollection, disableCertificateValidation, useExternalAuth, TimeSpan.FromSeconds(60), TimeSpan.FromSeconds(10), []); var brokerConnection = new BrokerConnection(connectionFactory); return brokerConnection; From 081dbb51b21c3f12585119d89d5353b6b31b0bcf Mon Sep 17 00:00:00 2001 From: Szymon Pobiega Date: Tue, 19 Nov 2024 09:43:49 +0100 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: WilliamBZA --- src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs index 5455f7e6d..501b6e71e 100644 --- a/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs +++ b/src/NServiceBus.Transport.RabbitMQ/RabbitMQTransport.cs @@ -98,10 +98,11 @@ public TimeSpan TimeToWaitBeforeTriggeringCircuitBreaker /// /// /// - /// When provided the customization is called after all other transport customizations configured, meaning that - /// any changes made by customization logic may override or conflict with previous transport-level adjustments. - /// This extension point should be used with caution, as modifying a native message at this stage can lead to unintended behavior - /// downstream if the message content or properties are altered in ways that do not align + /// When provided, the action is invoked after all other transport customizations have executed. + /// This means that any changes made by the native customization logic can override or conflict + /// with previous transport-level adjustments. This extension point should be used with caution, + /// as modifying a native message at this stage can lead to unintended behavior if the message + /// content or properties are altered in ways that do not align with expectations. /// with expectations elsewhere in the system. /// ///