We are planning to share the same persistence database( NserviceBus/Persistence) between multiple NSB hosts.
In that Case, we need to have different table names for TimeOutEntity, MessageStore, OutboxRecord to distinguish based on hosts.
Is there a way of configuration to specify the table names for a host to use in the NSB Persistence database.
Instead of using different table name for storage of each endpoint, I suggest keeping the names the same, but use a different schema, matching to the endpoint/business instead. Using the out of the box table names means easier devops experience as you can exactly point to tables for an endpoint.
To change the schema for SQL Persistence, you can do:
var persistence = endpointConfiguration.UsePersistence<SqlPersistence>();
persistence.Schema("myschema");
For SQL Transport you can do so as:
var transport = endpointConfiguration.UseTransport<SqlServerTransport>();
transport.DefaultSchema("myschema");
//For error/audit queues
transport.UseSchemaForQueue("error", "myschema");
transport.UseSchemaForQueue("audit", "myschema");
For information on deployment options (multi-catalog vs schema) have a look at the documentation page here.