Hey @Craig_Cox,
Before I really get into it, I don’t understand how Generic Host multiple endpoint hosting • NServiceBus Samples • Particular Docs is related to this, and I generally wouldn’t recommend that. Keep the endpoints in separate processes, as there’s usually not much to gain (and a lot of complexity involved) to try to smash them together in a single process boundary.
Here are a few other things to think about:
- A logical endpoint is your unit of scale. So anything that has different scalability requirements beyond the SLA is something to consider moving to a separate endpoint. I once was building a system that did push notifications to millions of devices. That definitely got its own endpoint.
- A logical endpoint is the thing that subscribes to events. (Handlers don’t subscribe to events, endpoints do.) So if you want multiple copies of a published event each processed individually, needs to be in separate endpoints.
- You could also slice by feature. It can be helpful especially when a system grows large enough that you have endpoints in multiple repos/solutions that are exchanging event contracts via NuGet package rather than sharing source directly. This is much more of an “It Depends” and “Your Mileage May Vary” situation so you don’t have to do it, but if it makes the system easier to reason about, then do it.
That help?