Spring cloud stream - concurrency
Hi there
I'm trying to configure more than one Consumer Thread for my functional consumer
But I saw that when I config concurrency as 5. It will create 5 session connection to the solace server.
when config concurrency is 5. It will create 5 session connection to the solace
when config concurrency is 10. It will create 10 session connection to the solace
is it the bug?
Comments
-
Hi @tuancris92,
It is not a bug. The concurrency setting is meant for creating concurrent consumer flows to consume messages from the queue. Note that the group's queue must have been non-exclusive (default if not specified) - that's how it supports multiple consumers on the queue. More info can be found in the Spring Cloud Stream binder docs.
If you want to create multiple consumers connecting to the same queue, consider multiple instances of the same application with a single consumer session.
[EDIT] Concurrency implies the number of flows created in a session - not concurrent session.
0 -
Hi @giri , Thank you for your answer. Do you have any problem if have a lot of session connections to the solace server?
0 -
But if have a lot of connection sessions to solace MQ, do they make the solace MQ slow? Do we have a document talk about this? @giri
0 -
Solace queue supports up to 10000 with a default of 1000 consumer flows per queue.
I would also recommend reading this thread that goes into this and related topics https://solace.community/discussion/1471/parallel-processing-of-messages-by-solace
And a blog on consumer scaling https://solace.com/blog/consumer-groups-consumer-scaling-solace/
Note that the topic we are discussing is general Solace Queue consumers and scaling - this applies to Solace queue access via any APIs and frameworks.
1