delay between BasicConsume() and first recevied message

90 views
Skip to first unread message

J W

unread,
Jun 2, 2023, 7:22:05 AM6/2/23
to rabbitmq-users
In my C# client, I need to handle messages from multiple queues, where each queue may have more than one routing key. For each routing key, I create a channel and an EventingBasicConsumer. When I register one or two channels for testing purposes, everything works fine. However, when I need to handle 10 or 15 queues, each with 3 or 4 keys, I encounter a problem. There is a significant delay of about 20 seconds between calling consumer.BasicConsume() for each consumer and when the handler receives the first message from the queue, even though there are ready messages in the queue when the client starts. It is worth mentioning that once it finally starts, it runs fine. There is no doubt that I am doing something wrong, as RabbitMQ supports a high degree of parallelism.

Michal Kuratczyk

unread,
Jun 2, 2023, 7:38:09 AM6/2/23
to rabbitm...@googlegroups.com
Please create a repository that we can use to see the code and run it ourselves.
It could be a server-side problem, but the easiest way for us to investigate is something we can easily run against a locally running server.

On Fri, Jun 2, 2023 at 1:22 PM J W <jab...@gmail.com> wrote:
In my C# client, I need to handle messages from multiple queues, where each queue may have more than one routing key. For each routing key, I create a channel and an EventingBasicConsumer. When I register one or two channels for testing purposes, everything works fine. However, when I need to handle 10 or 15 queues, each with 3 or 4 keys, I encounter a problem. There is a significant delay of about 20 seconds between calling consumer.BasicConsume() for each consumer and when the handler receives the first message from the queue, even though there are ready messages in the queue when the client starts. It is worth mentioning that once it finally starts, it runs fine. There is no doubt that I am doing something wrong, as RabbitMQ supports a high degree of parallelism.

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/163ab2aa-0186-4467-bc58-2bf6c07eb239n%40googlegroups.com.


--
Michał
RabbitMQ team

Luke Bakken

unread,
Jun 2, 2023, 9:39:00 AM6/2/23
to rabbitmq-users
Hello,

You are probably running into the same issue described here: https://github.com/rabbitmq/rabbitmq-dotnet-client/issues/1252


Solution - increase the size of the thread pool. This should be addressed in the next major version of the client library.

Thanks,
Luke

Reply all
Reply to author
Forward
0 new messages