-
Notifications
You must be signed in to change notification settings - Fork 11
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
feat: use scoped message handlers via pumps/routers #397
feat: use scoped message handlers via pumps/routers #397
Conversation
✅ Deploy Preview for arcus-messaging canceled.
|
/azp run CI - Arcus.Messaging |
Azure Pipelines successfully started running 1 pipeline(s). |
What do you mean exactly ? |
In situations where you have two different message pumps/routers, the message handlers were previously shared among them. This PR makes sure that each set of message handlers is scoped to the pump/router; meaning that a message handler with the same message type will not 'wrongly' process a message that was meant for another pump/router. |
Ok thanks. But I would assume that this is something that could not ever happen, as the message handler is registered with a message-pump anyway ? |
It seems that we do due to the code syntax, but behind the scenes they are all registered in the same dependency container. |
Enhances the current message handler registration by scoping any message handler registrations to a pump or router. This means that message handlers registered for another pump/router cannot be used during message routing.
This is a follow-up on the background jobs issue: arcus-azure/arcus.backgroundjobs#200
The cool 😎 thing about this enhancement, is that it does not changes anything for single-message pump/router registrations; but changes the way we work with multiple pumps (which is the case when background jobs are involved).
Closes #395