From bd7fa91f28f3822955ac4312913ededc299994c9 Mon Sep 17 00:00:00 2001 From: Benjamin SCHMITT Date: Thu, 19 Oct 2023 10:29:01 +0200 Subject: [PATCH] configure RabbitMq continuation timeout --- .../RmqMessageGateway.cs | 3 ++- .../RmqMessagingGatewayConnection.cs | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs index 296f577116..d640773fdb 100644 --- a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs +++ b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessageGateway.cs @@ -76,7 +76,8 @@ protected RmqMessageGateway(RmqMessagingGatewayConnection connection) _connectionFactory = new ConnectionFactory { Uri = Connection.AmpqUri.Uri, - RequestedHeartbeat = TimeSpan.FromSeconds(connection.Heartbeat) + RequestedHeartbeat = TimeSpan.FromSeconds(connection.Heartbeat), + ContinuationTimeout = TimeSpan.FromSeconds(connection.ContinuationTimeout) }; DelaySupported = Connection.Exchange.SupportDelay; diff --git a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs index d9108a6a62..732e46b125 100644 --- a/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs +++ b/src/Paramore.Brighter.MessagingGateway.RMQ/RmqMessagingGatewayConnection.cs @@ -67,6 +67,11 @@ public RmqMessagingGatewayConnection() /// public bool PersistMessages { get; set; } + /// + /// Gets or sets RabbitMq protocol timeouts, in seconds. Defaults to 20s. + /// for more information. + /// + public ushort ContinuationTimeout { get; set; } = 20; } ///