rebus-org / Rebus.SqlServer

:bus: Microsoft SQL Server transport and persistence for Rebus
https://mookid.dk/category/rebus
Other
43 stars 44 forks source link

Periodic queries to the database #104

Closed ADD-ACS closed 1 year ago

ADD-ACS commented 1 year ago

I noticed subscriber services make periodic queries to the database. I can imagine it is for knowing if they have pending messages so i supose it is a desired behaviour. Am I right? This provokes some overhead in every subscriber service and in the database engine.

Do all transport implementations behave similarly? Some of them have better performance because they avoid this periodic queries?

mookid8000 commented 1 year ago

I noticed subscriber services make periodic queries to the database. I can imagine it is for knowing if they have pending messages so i supose it is a desired behaviour. Am I right?

Yes 🙂

This provokes some overhead in every subscriber service and in the database engine. Do all transport implementations behave similarly? Some of them have better performance because they avoid this periodic queries?

All transports have some kind of overhead, since they need to connect to a queueing system somehow, and – depending on the supported protocol – might need to poll for messages.

If using a RDBMS for messages turns out to carry too much overhead with it for your particular use case, I recommend you use a real queueing system (e.g. Azure Service Bus, Amazon SQS, or RabbitMQ), because they're made for messaging and are therefore much more effective at it.

ADD-ACS commented 1 year ago

Okay, thanks. Everything is clear 😊.