Skip to content

Commit

Permalink
Add Azure Service Bus integration toggle
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sfmskywalker committed Sep 19, 2024
1 parent 426fb52 commit 593f7b6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bundles/Elsa.Server.Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -328,6 +329,9 @@
elsa.UseRealTimeWorkflows();
}
if (useAzureServiceBus)
elsa.UseAzureServiceBus(asb => asb.AzureServiceBusOptions += options => configuration.GetSection("AzureServiceBus").Bind(options));
if (useMassTransit)
{
elsa.UseMassTransit(massTransit =>
Expand Down

0 comments on commit 593f7b6

Please sign in to comment.