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!

https://docs.particular.net/samples/hosting/multi-hosting/?version=core_6

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