SubscriptionTableName does not cancel generation of dbo.SubscriptionRouting

I am using NSB 7.7.3 and the SqlServerTransport.

All of my SQL NSB table names are prefaced with “NServiceBus” (to differentiate from tables in the app not tied to NSB). I wanted to do the same for the SubscriptionRouting table and did so with:

var transport = endpointConfiguration.UseTransport<SqlServerTransport>();
transport.Routing().RouteToEndpoint(typeof(InterActionQueryResult), "NServiceBus.ActiveDirectory");
var subscriptions = transport.SubscriptionSettings();
subscriptions.SubscriptionTableName(tableName: "NServiceBus.SubscriptionRouting");

When EnableInstallers is running, two Subscription Routing tables are generated: one with the requested name and one with the name “dbo.SubscriptionRouting.” When EnableInstallers is not present, only “dbo.SubscriptionRouting” is generated. How does one automatically generate a renamed Subscription Routing table? Am I not understanding some principle behind how NSB generates its tables or do I need to manually edit the SQL table generation scripts? Thank you for any help you may be able to provide.

There was a second endpoint creating the second table. Putting the SubscriptionTableName on both endpoints resolved the issue.

1 Like