Gateway Upgrade Version 1 to 2

Component: Gateway

Extensibility

IForwardMessagesToSites, IRouteMessagesToEndpoints, and IRouteMessagesToSites have been deprecated and are no longer available as extension points in the gateway. These have been replaced by custom channel types.

Concurrency config

NumberOfWorkerThreads is now deprecated as a parameter for channels in the endpoint config file. Use MaxConcurrency to set the maximum number of messages that should be processed at any given time by the gateway instead.

2.x NServiceBus.Gateway
<GatewayConfig>
  <Channels>
    <Channel Address="http://hq.mycorp.com/"
             ChannelType="Http"
             MaxConcurrency="3"/>
  </Channels>
</GatewayConfig>
1.x NServiceBus.Gateway
<GatewayConfig>
  <Channels>
    <Channel Address="http://hq.mycorp.com/"
             ChannelType="Http"
             NumberOfWorkerThreads="3"/>
  </Channels>
</GatewayConfig>

Automatic retries

In Versions 2 and above the gateway has its own retry mechanism. It will retry failed messages 4 times by default, increasing the delay by 60 seconds each time. The default retry policy can be replaced.

Notifications

In Versions 2 and above the gateway does not provide any error notifications. When an error occurs during sending of a message to other sites, the message will be retried and possibly moved to the error queue.

Note that in Version 1, when subscribing to error notifications the notification is received in the situation described above.

Related Articles


Last modified