Spring Cloud Stream: spring.cloud.stream.default.consumer.concurrency property exactly meaning

italktothewind

I would like to know the exactly meaning of "concurrency" when using spring.cloud.stream.default.consumer.concurrency property.

Documentation (https://docs.spring.io/spring-cloud-stream/docs/Chelsea.RELEASE/reference/html/_configuration_options.html) says "The concurrency of the inbound consumer" and this can be interpreted in several ways.

What kind of thread executor is created behind the scenes?

Thanks!

sobychacko

The semantics of concurrency is dependent on the actual binder implementation. For example in the case of the Kafka binder, when you set concurrency, that value will be passed on to the underlying MessageListenerContainer. Lets say that your consumer application is consuming from a topic that has 3 partitions and you set the value of concurrency to 3. This will create 3 threads by the container in which each of them is handling a single partition from the topic (In fact, in the case of Kafka binder, 3 listener containers will be created behind the scenes). If there are more partitions on the topic than there are concurrent threads, then the partitions will be distributed across the various threads. The same semantics apply for the Rabbit binder as well although the actual implementation of it may vary slightly internally.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Spring Cloud Stream - Concurrency

Spring Cloud Stream KStream Consumer Concurrency has no effect?

Spring Cloud Stream - Solace PubSub+ - Consumer Concurrency

Spring Cloud Stream consumer startup

Spring Cloud Stream Kafka consumer patterns

Abstracting Spring Cloud Stream Producer and Consumer code

Spring Cloud Stream: consumer for different message types

Spring Cloud Stream Kafka Consumer Test

Spring Cloud Stream Kinesis Binder - Concurrency

Spring cloud stream what is the meaning of in-0

Relation between Eventhub topic partition count and spring.cloud.stream.bindings.input.consumer.concurrency

Spring Cloud Stream for Kafka with consumer/producer API exactly once semantics with transaction-id-prefix is not working as expected

Kafka client id property with spring cloud stream

what is the use of the property spring.cloud.stream.bindings.<channelName>.consumer.partitioned

Kafka - spring cloud stream

Spring Cloud Stream FencedInstanceIdException

Spring cloud stream

Spring Cloud Stream RabbitMQ

Spring Cloud Stream validation

Spring cloud stream with RabbitMQ

Spring Cloud Stream + Quartz

PollableChannel in Spring Cloud Stream

How to tell if every consumer finished in Spring Cloud Stream Kafka?

Receive message when consumer is up in spring-cloud-stream app

Batch Consumer not working with Kafka for CloudEvents using Spring Cloud Stream

Multiple bindingRoutingKey's for a consumer with Spring Cloud Stream using RabbitMQ

Spring cloud aws stream, messages are consumed by multiple instances in consumer group

consumption of events stopped after the consumer throw an exception in spring cloud stream?

How to bind Spring cloud stream binding for producer and consumer?