NServiceBus Version 6 ServiceControl Plugins Upgrade Version 1 to 2

Component: ServiceControl

Connecting to ServiceControl

Version 2 of the ServiceControl plugins changes the way that the plugins connect to ServiceControl. The plugins no longer derive a ServiceControl queue name from the Error/Audit queues. Additional configuration is required to specify the location of the ServiceControl queue.

Configuration File

The location of the ServiceControl queue can be specified once for all plugins in via an appSetting in the endpoint configuration file.

<appSettings>
  <add key="ServiceControl/Queue"
       value="particular.servicecontrol@machine" />
</appSettings>

Code

The location of the ServiceControl queue can be specified via plugin-specific extensions to the endpoint configuration.

Heartbeats

3.x ServiceControl.Plugin.Nsb6.Heartbeat
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.HeartbeatPlugin(
    serviceControlQueue: "ServiceControl_Queue");
2.x ServiceControl.Plugin.Nsb6.Heartbeat
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.HeartbeatPlugin(
    serviceControlQueue: "ServiceControl_Queue");

CustomChecks

3.x ServiceControl.Plugin.Nsb6.CustomChecks
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.CustomCheckPlugin(
    serviceControlQueue: "ServiceControl_Queue");
2.x ServiceControl.Plugin.Nsb6.CustomChecks
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.CustomCheckPlugin(
    serviceControlQueue: "ServiceControl_Queue");

SagaAudit

3.x ServiceControl.Plugin.Nsb6.SagaAudit
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.SagaPlugin(
    serviceControlQueue: "ServiceControl_Queue");
2.x ServiceControl.Plugin.Nsb6.SagaAudit
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.SagaPlugin(
    serviceControlQueue: "ServiceControl_Queue");
1.x ServiceControl.Plugin.Nsb6.SagaAudit
var endpointConfiguration = new EndpointConfiguration("myendpoint");
endpointConfiguration.SagaPlugin(
    serviceControlUrl: "ServiceControl_Queue");

Related Articles


Last modified