NServiceBus: why a toolkit for Saga(s) is so important
The “*Mongo*” stuff is my own implementation for MongoDB of the NServiceBus Timeout persister and of the Saga persister.public class EndpointConfig : IConfigureThisEndpoint, AsA_Publisher, IWantCustomInitialization { public void Init() { NServiceBus.Configure.With() .Log4Net() .DefaultBuilder() .XmlSerializer() .MsmqSubscriptionStorage() .DisableRavenInstall() .RunTimeoutManager() .UseMongoTimeoutPersister() .Sagas() .WithMongoSagaPersister() .MsmqTransport() .IsTransactional( true ) .PurgeOnStartup( false ) .UnicastBus() .ImpersonateSender( false ); } }
Add a reference to NServiceBus and NServiceBus.Host via Nuget add the above class to a class library project and you have a saga hosting server “up & running” in seconds.
The implementation details are details and thus having a toolkit that takes care of all the implementation details allows us to concentrate on the core, where the ciccia* is as my dear friend Alessandro used to say.
*ciccia: word reference dictionary. Italian idiom to identify the important portion of something.
.m