Database Reference
In-Depth Information
UseTransport<AzureStorageQueue> : You can use Azure queues; see ht-
tp://docs.particular.net/NServiceBus/windows-azure-transport . A sample of this is
found at https://github.com/Particular/NServiceBus.Azure.Samples .
The saga persister
The saga persister is where the saga message data will be saved. It is just data, but it is
handled like a message in many cases. When setting up saga data, we have a few choices
on whether to save it to a database or not, and there are many databases that NHibernate
will support. By default, the RavenDB database will be used. Here are some of the saga
persister choices:
UseNHibernateSagaPersister() : You can use NHiberntae based on the
connection string in app.config to store the saga instance
UseInMemorySagaPersister() : You can use volatile memory storage to
store the saga instance
RavenSagaPersister() : You can use RavenDB to store the saga instance
The timeout persister
The procedure to set up a timeout persister can be found in many documents, such as the
saga documentation at http://docs.particular.net/NServiceBus/sagas-in-nservicebus . When
designing a saga message handler, the timeout creation is entered early on in the functions
to ensure that any code beforehand is not a concern. For example, we are setting up the
saga timeout code; while doing this, the creation code will create a timeout message, say
of 60 seconds, and the question that will remain is where the timer and timeout messaging
code will be saved. If it is in the memory, and obviously if the system is rebooted and the
application shuts down, it is no longer persisted as it was in memory. Many NSB services
are designed in a way that when a server is completely rebooted and the services are re-
started, they would start from where they had left off, including timeouts that would still
be running in sagas. For this reason, the timeout messaging has to be persisted to a data-
base, thus enters RavenDB and the NHibernate interface of databases for the timeout per-
sister. By default, the RavenDB database will be used. Here are a few variations on how
the timeout message can be persisted as it is timing down:
UseNHibernateTimeoutPersister() : Using the implementation of the
NHibernate package for Timeout Manager
UseInMemoryTimeoutPersister() : Using the volatile local memory to
store Timeout Manager
Search WWH ::




Custom Search