From 593f7b6b9836bee3331da8b3c3010fa7f927bbac Mon Sep 17 00:00:00 2001 From: Sipke Schoorstra Date: Thu, 19 Sep 2024 20:11:13 +0200 Subject: [PATCH] Add Azure Service Bus integration toggle Introduced a new configuration constant `useAzureServiceBus` to control the optional integration with Azure Service Bus. Implemented conditional logic to bind Azure Service Bus options from configuration if the flag is enabled. --- src/bundles/Elsa.Server.Web/Program.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bundles/Elsa.Server.Web/Program.cs b/src/bundles/Elsa.Server.Web/Program.cs index ac70b9cc0d..d4d383c7df 100644 --- a/src/bundles/Elsa.Server.Web/Program.cs +++ b/src/bundles/Elsa.Server.Web/Program.cs @@ -49,6 +49,7 @@ const bool useCaching = true; const bool useReadOnlyMode = false; const bool useSignalR = true; +const bool useAzureServiceBus = false; const DistributedCachingTransport distributedCachingTransport = DistributedCachingTransport.MassTransit; const MassTransitBroker useMassTransitBroker = MassTransitBroker.AzureServiceBus; @@ -328,6 +329,9 @@ elsa.UseRealTimeWorkflows(); } + if (useAzureServiceBus) + elsa.UseAzureServiceBus(asb => asb.AzureServiceBusOptions += options => configuration.GetSection("AzureServiceBus").Bind(options)); + if (useMassTransit) { elsa.UseMassTransit(massTransit =>