Sagas can now be initiated by multiple different message types! This enables more flexible workflow orchestration patterns.
public class OrderSaga : Saga<OrderState>,
IStartedBy<OrderCreatedEvent>, // Can start from order creation
IStartedBy<PaymentReceivedEvent>, // OR from payment received
IHandleMessage<InventoryReservedEvent>
{
// Either message can initiate the saga
// Optimistic locking prevents duplicates
}Thanks to @arootbeer for the implementation! (#101)
Fixed: Lock queries were missing saga type filters, causing wrong saga retrieval when multiple saga types shared correlation IDs.
- Impact: HIGH - Could cause state corruption in multi-saga workflows
- Fixed in:
SqlSagaStateRepository.cs
Fixed: Retry failures now preserve both original and retry exceptions in an AggregateException.
- Impact: HIGH - Production debugging was nearly impossible
- Fixed in:
SagaExecutionService.cs
Fixed: Removed duplicate ConnectionShutdownAsync registration causing race conditions.
- Impact: MEDIUM - Unnecessary reconnection attempts
- Fixed in:
RabbitPersistentConnection.cs
Fixed: Changed static semaphore to instance-level, eliminating global serialization.
- Impact: MEDIUM - Severe performance bottleneck removed
- Fixed in:
SqlOutboxRepository.cs
Fixed: Proper cancellation token propagation enables graceful shutdown.
- Impact: MEDIUM - Apps could hang during shutdown
- Fixed in:
RabbitMessageSubscriber.cs
- 8 new unit tests for repository and execution service
- 1 new integration test for multi-saga correlation scenarios
- 116 total unit tests passing
- Zero regressions
All OpenSleigh packages updated to v3.1.0:
- OpenSleigh
- OpenSleigh.InMemory
- OpenSleigh.Persistence.SQL / SQLServer / PostgreSQL / Mongo
- OpenSleigh.Transport.RabbitMQ / Kafka
None for standard usage! Fully backward compatible.
SagaDescriptor.InitiatorType→InitiatorTypes(nowISet<Type>)TypeExtensions.GetInitiatorMessageType()returnsISet<Type>
- @arootbeer - Multiple saga starters feature
- @mizrael - Bug fixes, testing, and release management
# Update packages
dotnet add package OpenSleigh --version 3.1.0
dotnet add package OpenSleigh.Persistence.SQL --version 3.1.0
dotnet add package OpenSleigh.Transport.RabbitMQ --version 3.1.0No code changes required. Run your test suite and enjoy! 🚀
Full Changelog: CHANGELOG-3.1.0.md
Compare: v3.0.6...v3.1.0