Enexure.MicroBus
Enexure.MicroBus copied to clipboard
Global Handler - with restrictions
Hi Daniel,
I have just taken a look at mediatr and this. Good work btw, your implementation performs really well. It would be useful to be able to define a global handler that is restrictable to specific types, similar to mediatr implementation in their PipelineBehavior.
IPipelineBehavior<ChangeUserAddressData, UserAddressData>), typeof(LoggingBehavior<ChangeUserAddressData, UserAddressData>));
Additionally it would be useful to be able to add an interface on the message handlers, omit or include list of GlobalHandlers that could be passed when registering the handler.
Best,
Ian.
Hey @topsey
Thanks for your feedback. I've been thinking about including something like this as I've found myself checking the message types inside global handlers to get this kind of behaviour. A little bit of history: before version one of MicroBus it only had explicit registrations but no concept of global handlers. Global handlers provided a lot of value but per message type handlers were removed along the way. I think it's worth looking more into adding this feature or something similar.
Hi Daniel,
Agreed it will be a worthy addition.