rebus-org / Rebus.PostgreSql

:bus: PostgreSQL persistence for Rebus
https://mookid.dk/category/rebus
Other
18 stars 20 forks source link

Limitting concurrent use of connection during sends #8

Closed dtabuenc closed 6 years ago

dtabuenc commented 6 years ago

rebus-org/Rebus#665

This addition essentially locks the connection on sends so that it will not allow concurrent use (which happens often during publishes). There are now two AsyncBottleneck one for the send and one for the receive. The send is limited to a max concurrency of 1. The receive is unchanged (it is assumed that concurrent receives will always occur in their own contexts, so the connection is not shared).


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

CLAassistant commented 6 years ago

CLA assistant check
All committers have signed the CLA.

dtabuenc commented 6 years ago

I wrote a small test for this but could not figure out how to run it for some reason so didn't know if it worked or not. For some reason it keeps complaining that it can't find any tests when I run dotnet test

mookid8000 commented 6 years ago

It's out in 4.1.0 in a few minutes – thanks for your contribution 😄