NServiceBus endpoints have always been good at running reliably, but they could have been better at stopping. And when you want an endpoint to stop, you want it to stop…now.
In NServiceBus 8.0, which is now available, we have introduced support for cooperative cancellation, which will give you greater control over how an NServiceBus endpoint behaves when you need to shut it down.
Let’s talk about what cancellation is, how it relates to NServiceBus, and how we’re delivering cancellation in NServiceBus 8 without forcing a massive breaking change on your existing systems.Read more
If you remember the upgrade to NServiceBus 6, we had a similar interface change to support async/await. While we still stand by that change now, it's not something we care to repeat.
This technically means anywhere one of your method parameters implements
ICancellableContext. This is a new interface we added as it includes both
IMessageHandlerContextderives) as well as
...or behaviors. But message handlers are far more common, so we'll focus on them here.
Come on, admit it, you do. I do too. Let's just all agree most of those messages aren't worth our time, right?
nonemay sound like the same thing, but they're not. If you choose
silent, you don't get any squigglies or dots in the code, but if you hover your mouse over the code, you'll still get the analyzer message. If you choose
none, then the analyzer won't report diagnostics at all.