0
votes

Looking at the Publish-Subscribe API and Configuration page, it would seem that the database schema used by NServiceBus to track subscriptions only tracks the Subscriber Endpoint and Message Type.

I had hoped that maybe I could change the name of the table in order to use the same database for multiple publishers, but this thread seems to indicate that you can't.

The point is - I fully understand and agree with the notion of having a single publisher endpoint per event type - but that inevitably leads to having multiple publishers all operating out of the same application scope. Perhaps operating in different assemblies or processes but that is a moot point; regardless, it means that all or most publishers will share the same transactional database. So the possibility of having to actually create a separate SQL database for every individual publisher seems slightly ridiculous; we'd end up with hundreds of single-table subscription databases sitting around.

Does the DBSubscriptionStorage track enough information to identify the publisher as well, such that multiple publishers can all be pointed to the same database? Or if not, is there some configuration change or hack that I could use to accomplish the same end result?

Or am I actually going to need a separate database for every publisher - and by extension, every published message type?

1

1 Answers

3
votes

You absolutely can use the same table in the same database to store the subscriptions of multiple publishers. Since each publisher is responsible for its specific message types, there will be no logical overlap.