rebus-org / Rebus.RabbitMq

:bus: RabbitMQ transport for Rebus
https://mookid.dk/category/rebus
Other
63 stars 44 forks source link

Publisher confirms should be sent in batch #41

Closed kyrrem closed 5 years ago

kyrrem commented 5 years ago

When sending multiple messages in a rebus transaction, it takes a lot of time to confirm each message individually. Since we are reusing the same IModel from the current transaction, it should be safe to confirm all messages in one go. The performance difference when running inside a rebus transaction is huge.

Batch confirms is also recommended from the RabbitMQ webside due to performance and latency.

I extended the current performance tests to also run in transaction to be able to compare side by side.

kyrrem commented 5 years ago

Wanted to connect this to the PR: https://github.com/rebus-org/Rebus.RabbitMq/pull/40, but couldnt really find out how. Bit new to Github...

mookid8000 commented 5 years ago

Fixed by #40 – thanks! 😄

Your improvement is out with Rebus.RabbitMq 5.0.1 in a few minutes.