This extension allows a more expressive way to order handlers. HandlerOrdering allows the dependency between handlers to be expressed via interfaces and the resulting order is derived at runtime.
- Community backed
 - Support via TideLift
 - Usage
 - Expressing dependencies
 - Sample
 - Security contact information
 
Already a Patron? skip past this section
It is expected that all developers either become a Patron or have a Tidelift Subscription to use NServiceBusExtensions. Go to licensing FAQ
Support this project by becoming a Sponsor. The company avatar will show up here with a website link. The avatar will also be added to all GitHub repositories under the NServiceBusExtensions organization.
Thanks to all the backing developers. Support this project by becoming a patron.
Support is available via a Tidelift Subscription.
https://nuget.org/packages/NServiceBus.HandlerOrdering/
configuration.ApplyInterfaceHandlerOrdering();public class MessageHandler1 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler3>
{public class MessageHandler1 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler3>
{public class MessageHandler2 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler1>
{public class MessageHandler2 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler1>
{- MessageHandler3
 - MessageHandler1
 - MessageHandler2
 
The sample demonstrates how to use interfaces to express dependencies between handlers.
endpointConfiguration.ApplyInterfaceHandlerOrdering();public class MessageHandler1 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler3>
{public class MessageHandler1 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler3>
{public class MessageHandler2 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler1>
{public class MessageHandler2 :
    IHandleMessages<MyMessage>,
    IWantToRunAfter<MessageHandler1>
{- MessageHandler3
 - MessageHandler1
 - MessageHandler2
 
To report a security vulnerability, use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
Icon courtesy of The Noun Project