How to configure NServiceBus with two RavenDB IDocumentStores? -
in nsb 5, how correctly configure nsb autofac container 1 idocumentstore nsb info , separate idocumentstore application data? i've pasted relevant part of endpointconfig below:
// raven datastore freight scheme var appdatastore = new documentstore { connectionstringname = "ravendb", defaultdatabase = "applicationdata" }; appdatastore .initialize(); // raven datastore nservicebus var nsbdatastore = new documentstore { connectionstringname = "nservicebus.persistence", defaultdatabase = "bookingprocessing" }; nsbdatastore.initialize(); // set , build autofac container var builder = new containerbuilder(); builder.registerinstance<documentstore>(appdatastore ).as<idocumentstore>().singleinstance(); var container = builder.build(); // set nservicebus configuration.usecontainer<autofacbuilder>(customizations => customizations.existinglifetimescope(container)); configuration.usepersistence<ravendbpersistence>().setdefaultdocumentstore(nsbdatastore); i know isn't working since had problems storing sagas in another question. sagapersister tried persist saga in appdatastore, timeout messages persisted in nsbdatastore.
this sample 4.x using unit of work, if utilize
look here see how can implement imanageunitsofwork
the init here here usage
will help?
nservicebus nservicebus-sagas
No comments:
Post a Comment