Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexeyzimarev/MassTransit.RavenDbIntegration
RavenDb Saga persistence for MassTransit
https://github.com/alexeyzimarev/MassTransit.RavenDbIntegration
Last synced: 5 days ago
JSON representation
RavenDb Saga persistence for MassTransit
- Host: GitHub
- URL: https://github.com/alexeyzimarev/MassTransit.RavenDbIntegration
- Owner: alexeyzimarev
- License: apache-2.0
- Archived: true
- Created: 2016-03-08T22:25:25.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-29T17:43:28.000Z (about 6 years ago)
- Last Synced: 2024-10-07T01:04:06.616Z (about 1 month ago)
- Language: C#
- Homepage:
- Size: 8.14 MB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MassTransit.RavenDbIntegration
RavenDb Saga persistence for MassTransit 5[![az-github MyGet Build Status](https://www.myget.org/BuildSource/Badge/az-github?identifier=b5d89944-9bb6-4f62-aa11-77807aa395f0)](https://www.myget.org/)
[![NuGet](https://img.shields.io/nuget/v/MassTransit.RavenDbIntegration.svg)](https://www.nuget.org/packages/MassTransit.RavenDbIntegration/)## Installation
The library is published on nuget.org.
Use `Install-Package MassTransit.RavenDbIntegration` to install it.
## Usage
When you initialize your document store, call `store.RegisterSagaIdConvention();` after the initialization.
`RavenDbSagaRepository` constructor needs `IDocumentStore` instance as the only parameter.
## Important
RavenDb is a document database with fully consistent writes and eventually consistent queries.
It takes some time for RavenDb to update query index and during this time indexes are stale.
MassTransit uses two types of correlation for sagas:- Correlation by id using `CorrelateById` method and `Guid` as identity type. In such case
the repository will fetch saga document by its identity and it will be always consistent.- Correlation by other attributes using `CorrelateBy` method and a LINQ expression. For this type
of correlation, the repository will run a query. RavenDb will create an index automatically
but the index will be stale for some time. This means that for sagas with high traffic
this persistence method is not suiable since you will get misfires. This is especially valid
if you use composite events. You can improve the performance, you can create static indexes
but still, for sagas where many events can come at the same saga instance at the same time,
this persistence method is not suitable.