Enexure.MicroBus icon indicating copy to clipboard operation
Enexure.MicroBus copied to clipboard

Global Handler - with restrictions

Open topsey opened this issue 7 years ago • 2 comments

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.

topsey avatar Mar 22 '17 15:03 topsey

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.

daniellittledev avatar Mar 23 '17 22:03 daniellittledev

Hi Daniel,

Agreed it will be a worthy addition.

topsey avatar Apr 01 '17 16:04 topsey