elsa-workflows / elsa-workflows/elsa-core
[ENH] Enable and Disable MassTransit Consumers
- Dominant language
- C#
- Stars
- 7.9k
- Forks
- 1.5k
- Avg merge
- 15h 22m
- Merged PRs (30d)
- 114
Description
We need to enable the ability to deploy application instances with distinct roles: API servers and worker servers. To achieve this, we must update the MassTransit module to include a flag that controls whether endpoints with consumers are registered or not. This will allow for flexible deployment configurations where some instances act as workers, while others serve as HTTP API servers.
## Requirements
- **Flag for Consumer Registration:** Add a configuration flag to the MassTransit module to enable or disable the registration of consumers.
- **Role Flexibility:** Ensure that all instances, regardless of their role (API or Worker), retain the ability to send messages to endpoints.
- **Deployment Scenarios:**
- **API Role:** Instances act as HTTP API servers and do not register consumers.
- **Worker Role:** Instances register consumers to process messages.
## Acceptance Criteria
1. A configuration flag exists in the MassTransit module to control consumer registration.
2. API role instances do not register consumers but can send messages.
3. Worker role instances register consumers and can send messages.
4. All instances, irrespective of their role, can send messages to the necessary endpoints.
---
This issue aims to enhance the flexibility and scalability of deployments by clearly defining roles for different application instances and allowing configurable consumer registration in the MassTransit module.
Contributor guide
Assessment
This issue has not been assessed yet.