Queue processing for multiple endpoints in a self host

When running multiple endpoints in a self host. Are the messages consumed from their respective queues equally? Or will it drain one queue then move to the next?

We have a scenario were a few thousand messages are getting queued and we would like some to have priority. So we are considering a seperate queue but dont necessarily want to maintain a second service if its not needed.

Thanks!

When multi-hosting endpoints, the endpoints are two different endpoints hosted in the same process.
Each endpoint will process its own messages and will not be attempting messages of another endpoint.

Sean,

Are they on different threads? Just want to make sure that one endpoint doesn’t get stuck processing its queue and messages while the other waits it’s turn.

Thanks
Jimmy

The are not on different threads. Each endpoint is spawn off and is running asynchronously. They share the same process. Which means that if something happens to the process, all endpoints are affected. For example, you cannot upgrade one endpoint w/o stopping the rest of endpoints.

Thanks for your assistance, we will test it out further. And please correct me if i am misinterpreting, but it sounds like self hosted with multiple endpoints will help our customer’s requirement (which is to prioritize one of the message types).

It will help with splitting message handling into different endpoints. With that, having those endpoints under the same process is not so optimal if you need to take one of those endpoints down or respond to critical errors.

1 Like

@brandon-jimmyfitz How did you make out with this?

Did it help with giving priority to certain messages (or referring to the best practices, did it better allow you to group message handlers by SLA Best practices • NServiceBus • Particular Docs)?

We’re looking at a similar situation

Hi Craig,

We ended up having a conversation with our client to determine if these other messages were really needed to be a priority; they were not and a single endpoint/queue was sufficient.

Jimmy