Replies: 1 comment 9 replies
-
Multiple consumers per channel rarely make things easier but if you think they do in your case, in terms of concurrent application code, you can use, say, 4-16 consumers per channel. It won't matter as far as RabbitMQ is concerned. You can try N channels with 1 consumer each, that can yield a small throughput gain on nodes with a lot of cores available. |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have a doubt about which is the best approach for concurret consuming messages within the same client.
My scenario is:
I have tested that I could have for example a prefetch of 5 and I can process and ack each message inside a Task, so they will be processed concurrently. (Probably its not a good idea to create as many tasks as the preftech count in case is a big number, I could configure the grade of parallelism with a separate config key).
The other approach is to have another consumer. In this case, is it a good idea to share the same channel? (if I have a timeout while processing in one of the consumers it will close the channel affecting the other consumer....)
Which would be the best approach?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions