zarusz/SlimMessageBus

Concurrently processed messages for RabbitMq transport

Closed this issue · 4 comments

how to process messages in parallel when using RabbitMq?

hello @robert94p ,

By default, the underlying RabbitMq net driver uses a concurrency of 1.
Following this it can be adjusted on the ConnectionFactory object.

For example, try to set this via SMB like so:

services.AddSlimMessageBus((mbb) =>
{
    mbb.WithProviderRabbitMQ(cfg =>
    {
        cfg.ConnectionFactory.ConsumerDispatchConcurrency = 2; // default is 1
        // ...
    }
}

Please let me know if this worked for you.

registered several buses for one consumer. While it works

Did you try the provided suggestion (with ConsumerDispatchConcurrency setting)?
Sounds like you've taken another route, can you explain what you mean several buses for one consumer?
Thanks

As part of #207 I have updated the docs to include information on how to increase concurrency.

If you run into any problems, please re-open the issue and let me know.

Thanks!