-
-
Couldn't load subscription status.
- Fork 370
Saga parallelism
Sometimes when working with sagas, you will know beforehand that there will be contention around certain saga instances.
This often happens e.g. if a saga spawns off work in the form of a bunch of requests, to which it will receive (and keep track of) a bunch of replies – all these replies will hit the same saga instance, in which case parallel execution does not make any sense at all.
If you often experience ConcurrencyExceptionss because of this (or another similar) problem, you can avoid parallel execution completely within the current process by enabling in-process locking with the EnforceExclusiveAccess() extension like this:
Configure.With(...)
.(...)
.Sagas(s => {
s.StoreIn(...);
s.EnforceExclusiveAccess();
})
.Start();This will enable an incoming message middleware that grabs locks on each (saga type, correlation property name, correlation property value) tuple relevant for the incoming message – possibly waiting for the locks to become available – before creating/loading the saga data.
This way, exclusive access is guaranteed for this particular bus instance.
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