elsa-core/src/modules/Elsa.AzureServiceBus
Sipke Schoorstra a827ab241b
Fix Azure Service Bus module DI issues (#5975)
* Switch to Azure Service Bus for message brokering

Updated the message broker from in-memory to Azure Service Bus to enhance scalability. Added new configuration settings and dependencies to support Azure Service Bus integration, including scoped service initialization and queue/topic management.

* Refactor StartWorkers for dependency injection

Updated StartWorkers class to use constructor parameter injection and service scope factory for retrieving services. This refactor eliminates the need for field-level dependency storage, enhancing testability and adherence to the dependency injection principles. Additionally, annotated the class with [UsedImplicitly] to eliminate unused code warnings.

* Refactor Worker to use IServiceScopeFactory for dependency resolution

Refactored the Worker class to use IServiceScopeFactory for DI instead of directly injecting IWorkflowInbox. This enhances the flexibility and lifecycle management of the dependencies.

* 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.

* Add IComposite interface and implement Setup method

Introduced a new IComposite interface and added a default Setup method to the Composite class. Updated the ActivityFactory to call the Setup method when an activity is an instance of IComposite. The CompositeExample class demonstrates the use of the new interface and method.

* Remove AzureServiceBus configuration setup

The AzureServiceBus configuration setup was removed from the Program.cs file. This change aims to streamline configuration and remove unused or unnecessary setup, ensuring the code remains clean and maintainable.

* Switch MassTransit broker to in-memory

Changed the MassTransit broker from AzureServiceBus to Memory in the application configuration. This adjustment aims to simplify deployment and reduce dependencies in the current environment.
2024-09-19 20:48:09 +02:00
..
Activities Add a more generic UIHandler to customize how inputAttributes can be handle by UI (#4688) 2023-12-26 18:56:29 +01:00
Contracts Refactor scheduling and background activity execution (#3884) 2023-04-09 23:35:32 +02:00
Extensions Finish Azure Service Bus activities (#3617) 2023-01-12 11:59:31 +01:00
Features Fix Azure Service Bus module DI issues (#5975) 2024-09-19 20:48:09 +02:00
Handlers Improve JSON serializationfor workflow state (#3913) 2023-04-17 00:11:58 +02:00
HostedServices Fix Azure Service Bus module DI issues (#5975) 2024-09-19 20:48:09 +02:00
Models Finish Azure Service Bus activities (#3617) 2023-01-12 11:59:31 +01:00
Options Finish Azure Service Bus activities (#3617) 2023-01-12 11:59:31 +01:00
Providers Rename "services" to "contracts" and "implementations" to "services" (#3758) 2023-03-03 22:47:23 +01:00
Services Fix Azure Service Bus module DI issues (#5975) 2024-09-19 20:48:09 +02:00
Elsa.AzureServiceBus.csproj Convert to use Central Package Management 2024-02-04 13:49:54 +02:00
FodyWeavers.xml Prepare projects for packaging 2022-11-03 21:40:23 +01:00