Hi everyone,
We’ve just released NServiceBus.SagaAudit 6.1.0.
Improvements/Features
- #733 Accept JsonSerializerOptions for saga data serialization
- #729 Add saga audit headers to the audit message instead of the incoming message
A new AuditSagaStateChanges overload accepts the JsonSerializerOptions that SagaAudit uses to serialize saga data. Use it to serialize saga data with source-generated System.Text.Json metadata instead of reflection. The options must provide metadata for every saga data type. If they do not, the endpoint fails to start, and the exception names each affected type.
Endpoints that do not use the new overload will continue to serialize saga data as before. At startup, SagaAudit now logs a warning for each saga data type that it cannot serialize. If you call AuditSagaStateChanges(serviceControlQueue, null) with an explicit null, remove the null argument. The call is now ambiguous and does not compile.
SagaAudit now adds the NServiceBus.InvokedSagas and ServiceControl.SagaStateChange headers only to the audit message. The audit message still carries both headers, so ServiceControl and ServicePulse need no changes. Handlers and pipeline behaviors that run after a saga no longer see these headers in the incoming message headers. Messages forwarded with ForwardCurrentMessageTo no longer include them. A custom audit action that does not apply the audit metadata drops both headers.
When to upgrade
You should upgrade during your next maintenance window, unless you need the new functionality sooner. Before you upgrade, check whether your code reads the saga audit headers during message processing.
Where to get it
You can install NServiceBus.SagaAudit 6.1.0 from NuGet. This release requires NServiceBus 10.2.10 or later.
Please read our release policy for more details.
With thanks,
The team in Particular