8000 Add IBusRegistrationContext to Transport Configuration Actions by CODEdire · Pull Request #6413 · elsa-workflows/elsa-core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add IBusRegistrationContext to Transport Configuration Actions #6413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

CODEdire
Copy link
Contributor
@CODEdire CODEdire commented Feb 15, 2025

This PR updates MassTransit configuration for Azure Service Bus and RabbitMQ. Previously, the IBusRegistrationContext was not included in the configuration action and prevents configuration of additional MassTransit components that require the context being passed in.

  • Program.cs: Replaces ConfigureServiceBus with ConfigureTransportBus as the old action is now obsolete.
  • AzureServiceBusFeature.cs and RabbitMqServiceBusFeature.cs: Marks ConfigureServiceBus as obsolete, introduces ConfigureTransportBus. Added XML documentation to bring awareness to the alternative action and some clarification that this action runs in addition to Elsa's standard configuration.
  • MassTransitFeature.cs: Updates ConfigureInMemoryTransport method documentation and updates AddMassTransit method within to include MassTransitOptions configuration for prefetch count. While not directly part of the change, it was made because PrefetchCount was marked as obsolete in the feature class.

NOTE: A name of ConfigureTransportBus was chosen for the new action to avoid conflicts with the old ConfigureServiceBus. Given that both ASB and RMQ are both transports in the eyes of MassTransit, it made the most sense to go this route without doing something like ConfigureServiceBusWithContext or similar.


This change is Reviewable

CODEdire and others added 2 commits February 15, 2025 13:04
…ptions as the source for the prefetch count as the new source for this information is in the base MassTransitOptions. Created a new ConfigureTransportBus in both RabbitMQ and Azure Service Bus to support the context in the configuration action. Marked the old ConfigureServiceBus to persuade migration over to the contextual action. Currently, it will run the legacy action first and then the new contextual action second. The Elsa.Server.Web was also updated to use the new ConfigureTransportBus.
Added minor changes to MassTransitFeature to start using MassTransitOptions as the source for the prefetch count as the new source for this information is in the base MassTransitOptions. Created a new ConfigureTransportBus in both RabbitMQ and Azure Service Bus to support the context in the configuration action. Marked the old ConfigureServiceBus to persuade migration over to the contextual action. Currently, it will run the legacy action first and then the new contextual action second. The Elsa.Server.Web was also updated to use the new ConfigureTransportBus.
@CODEdire
Copy link
Contributor Author
CODEdire commented Feb 15, 2025

@dotnet-policy-service agree

Copy link
Member
@sfmskywalker sfmskywalker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome 👍🏻

@sfmskywalker sfmskywalker merged commit 6bb83c5 into elsa-workflows:main Feb 19, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0