Upgrade from ServiceControl.Plugin.NsbX.SagaAudit to NServiceBus.SagaAudit

Component: ServiceControl

Connecting to ServiceControl

The NserviceBus.SagaAudit package replaces the ServiceControl.Plugin.Nsb5.SagaAudit and ServiceControl.Plugin.Nsb6.SagaAudit packages. It also introduces a new version compatible with NServiceBus Version 7.

To update, remove the deprecated package and install the NServiceBus.SagaAudit package.

2.x NServiceBus.SagaAudit
Uninstall-Package ServiceControl.Plugin.Nsb6.SagaAudit
Install-Package NServiceBus.SagaAudit -Version 2.0.0
1.x NServiceBus.SagaAudit
Uninstall-Package ServiceControl.Plugin.Nsb5.SagaAudit
Install-Package NServiceBus.SagaAudit -Version 1.0.0

Configuration

The deprecated packages allowed configuration of ServiceControl queue via a convention in which an application setting ServiceControl/Queue was picked up automatically. The new package requires explicit configuration. When upgrading, the following code needs to be added to the endpoint setup code to retrieve the ServiceControl queue from the configuration file and pass it to the plugin.

2.x NServiceBus.SagaAudit
var endpointConfiguration = new EndpointConfiguration("MyEndpoint");

var setting = ConfigurationManager.AppSettings["ServiceControl/Queue"];

endpointConfiguration.AuditSagaStateChanges(
    serviceControlQueue: setting);
1.x NServiceBus.SagaAudit
var endpointConfiguration = new BusConfiguration();

var setting = ConfigurationManager.AppSettings["ServiceControl/Queue"];

endpointConfiguration.AuditSagaStateChanges(
    serviceControlQueue: setting);

Related Articles


Last modified