-
-
Notifications
You must be signed in to change notification settings - Fork 364
ISagaStorage
ISagaStorage
is Rebus' saga storage abstraction which is responsible for doing the following things:
- insert a new saga
- update an existing saga
- delete an existing saga
- find an existing saga based on the value of a "correlation property" (i.e. one of the possibly multiple properties of the saga data, which have been designated to be correlation properties beforehand)
No matter which saga storage you choose (i.e. SQL Server, in-mem, MongoDB, ...) it will expose the same behavior. Generally, the saga data will be protected from concurrency issues via optimistic locking (which uses the Revision
property of the saga data), throwing appropriate ConcurrencyException
s in case the "lock" was lost.
This ensures that the developer can write code in a saga and generally just assume that the current state of the saga data is in fact current, because if it turns out that it wasn't (i.e. the saga data was changed by someone else, e.g. another thread), the message transaction rolls back (due to the ConcurrencyException
) and message delivery is retried.
The saga storage is configured with the Sagas
configurer, e.g. like so:
Configure.With(...)
.(...)
.Sagas(s => s.StoreInSqlServer(connectionString, "Sagas", "SagaIndex"))
.(...)
causing the saga data to be saved to the [Sagas]
table, using the [SagaIndex]
table to store extracted correlation property key-value pairs.
Rebus has saga storages for other databases too, e.g. for MongoDB, PostgreSQL, and RavenDB.
Basic stuff
- Home
- Introduction
- Getting started
- Different bus modes
- How does rebus compare to other .net service buses?
- 3rd party extensions
- Rebus versions
Configuration
Scenarios
Areas
- Logging
- Routing
- Serialization
- Pub sub messaging
- Process managers
- Message context
- Data bus
- Correlation ids
- Container adapters
- Automatic retries and error handling
- Message dispatch
- Thread safety and instance policies
- Timeouts
- Timeout manager
- Transactions
- Delivery guarantees
- Idempotence
- Unit of work
- Workers and parallelism
- Wire level format of messages
- Handler pipeline
- Polymorphic message dispatch
- Persistence ignorance
- Saga parallelism
- Transport message forwarding
- Testing
- Outbox
- Startup/shutdown
Transports (not a full list)
Customization
- Extensibility
- Auto flowing user context extensibility example
- Back off strategy
- Message compression and encryption
- Fail fast on certain exception types
Pipelines
- Log message pipelines
- Incoming messages pipeline
- Incoming step context
- Outgoing messages pipeline
- Outgoing step context
Prominent application services