Component: SQL Server Transport
NuGet Package NServiceBus.SqlServer (1.x)
Target NServiceBus Version: 4.x
Standard support for version 4.x of NServiceBus has expired. For more information see our Support Policy.


The SQL Server Transport address has following canonical form


The table name is an bracket-delimited identifier without the surrounding square brackets. Whitespace characters are allowed. Brackets must be escaped, for example my table and my]]table are acceptable values. The surrounding brackets are added automatically by SQL Server transport when executing the SQL statements. @ is not a valid character. All characters after @ (including @) are omitted when parsing addresses e.g. my t@ble is parsed as my t.


The address is resolved into a qualified table name that includes both table name and its schema. The schema has to be configured.


A schema for a destination endpoint can be specified using a connection string convention. In the example below the connection string NServiceBus/Transport/Billing overrides the default if sending to the Billing queue, in which case billingSchema is used.

  <add name="NServiceBus/Transport"
       connectionString="Data Source=instance; Initial Catalog=db; Integrated Security=True;Queue Schema=salesSchema"/>
  <add name="NServiceBus/Transport/Billing"
       connectionString="Data Source=instance; Initial Catalog=db; Integrated Security=True;Queue Schema=billingSchema"/>
    <add Messages="Sales.Contract"
    <add Messages="Billing.Contract"

Last modified