We have briefly discussed RavenDB in the earlier chapters of this book. NSB takes care of the document mapping in the RavenDB database; however, we will cover some of the basics of RavenDB in a typical C# program without NSB. I will remind you to review the RavenDB licensing when working with RavenDB.
RavenDB is a document-oriented store database that is used by many defaults in NServiceBus and makes use of the JSON format. See https://ravendb.net/ for more information. In our previous PubSub example, we took out most pieces of the persistence from RavenDB and put it in a SQL Server. Now, we will put the subscriptions back into RavenDB.
This is done by deleting .UseNHibernateSubscriptionPersister()
, which we put earlier in the PubSub MyPublisher
example. After deleting this piece of code, NServiceBus will default to storing the subscription information back into RavenDB. When running the PubSub example, we can see that the subscription information was generated in RavenDB...