arcus-azure / arcus.messaging

Messaging with Microsoft Azure in a breeze.
https://messaging.arcus-azure.net
MIT License
20 stars 11 forks source link

Limit scope of message handlers by only running registered handlers linked to message pump #395

Closed stijnmoreels closed 1 year ago

stijnmoreels commented 1 year ago

Is your feature request related to a problem? Please describe. Currently, message pumps are using message handlers registered from other pumps when processing messages due to the fact that all the instances are registered in the same application services container.

Describe the solution you'd like We have recently added a JobId property to the message handler collection type that registers the message handlers. This ID can be used to within the message handler registration so that when it is retrieved from a wrong message pump, it will respond with a 'can not process this message' result.

Additional context Introduction of JobId in message handler collection: #333