JasperFx / wolverine

Supercharged .NET server side development!
https://wolverinefx.net
MIT License
1.21k stars 131 forks source link

"Sticky" Message Handler configuration to a specific endpoint #801

Closed jeremydmiller closed 1 month ago

jeremydmiller commented 5 months ago

This comes up often enough it's time to do something about it.

Let's say that there's a use case for the exact same message & message type to be handled separately and in parallel with separate message handlers. Wolverine can't do that today because it combines the handler calls on one chain ( a vestigal tail feature left over from the FubuTransportation roots)

Build some kind of syntax that allows for the handlers to be split between different endpoints & separate routing

BrianVallelunga commented 5 months ago

I'll add in our use case for reference. We have an Azure Service Bus Topic with multiple subscriptions. All messages sent to the topic are of the same type. However, each subscription on the topic has a filter on it and we want individual handlers for each subscription. Currently, all of our handlers are called, regardless of which subscription the message arrives from.

jeremydmiller commented 5 months ago

@BrianVallelunga I think this is likely to slide to Wolverine 2.3, but I'm hoping to get that out this coming week anyway. And thanks for the input!

jeremydmiller commented 5 months ago

@BrianVallelunga Unsurprisingly, I think I need to punt this until 2.4 in the next couple weeks. I've done some preliminary work and investigation so far.

jeremydmiller commented 1 month ago

Notes

jeremydmiller commented 1 month ago

@BrianVallelunga Here's the first tranche of work: https://github.com/JasperFx/wolverine/tree/sticky-handlers

More to come, but this will make it into 3.0

BrianVallelunga commented 1 month ago

Thanks for the update. I'm looking forward to trying this when 3.0 is out.