From 4cf797263f470f163b57e45efc93ae9f75c0580f Mon Sep 17 00:00:00 2001 From: Raymond den Haan Date: Tue, 26 Nov 2024 09:49:27 +0100 Subject: [PATCH] Update log level and comment for orphaned subscription removal --- .../Handlers/RemoveOrphanedSubscriptions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs b/src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs index 2df41e6af..292ac106a 100644 --- a/src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs +++ b/src/modules/Elsa.MassTransit.AzureServiceBus/Handlers/RemoveOrphanedSubscriptions.cs @@ -45,7 +45,9 @@ public class RemoveOrphanedSubscriptions(MessageTopologyProvider topologyProvide } catch (ServiceBusException ex) when (ex.Reason == ServiceBusFailureReason.MessagingEntityNotFound) { - logger.LogWarning("Unable to remove orphaned subscription: Service bus entity {entityPath} was not found, most likely due to it being removed automatically", ex.EntityPath); + // Queues are created with a TTL, which causes them to be deleted automatically. + // We still need to try to delete them in case the queue is still receiving messages, which prevents the auto-deletion. + logger.LogInformation("Unable to remove orphaned subscription: Service bus entity {entityPath} was not found, most likely due to it being removed automatically", ex.EntityPath); } } }