spring-cloud-stream icon indicating copy to clipboard operation
spring-cloud-stream copied to clipboard

The number of consumers is proportional to the length of the startup

Open coldingcode opened this issue 7 years ago • 3 comments

spring:
  cloud:
    stream:
      default-binder: rabbit
      binders:
        rabbit:
          type: rabbit
          environment:
            spring:
              rabbitmq:
                addresses: ${spring.rabbitmq.addresses}
                username: ${spring.rabbitmq.username}
                password: ${spring.rabbitmq.password}
                virtual-host: ${spring.rabbitmq.virtual-host}
      bindings:
        event_oneLocation_consumer:
          content-type: application/json;charset=UTF-8
          destination: event_oneLocation
          group: ${spring.application.name}
          consumer: 
            header-mode: raw
            concurrency: 120

my application startup time used 900 seconds when setting number of consumers is 120. by the way ,if dont set this number of consumers, rabbitmq message will accumulation. could you please help me make startup time shorten

coldingcode avatar Jun 04 '19 09:06 coldingcode

Why do you need 120 consumers? That level of concurrency most definitely will cause an issue. Also, I want to make sure that when concurrency is set to > 1 you loose ordering.

Could you please describe your case a bit more?

olegz avatar Jun 04 '19 10:06 olegz

The queue I subscribe to has a lot of messages to consume.If the consumption is not timely, it will cause a lot of accumulation.

coldingcode avatar Jun 04 '19 13:06 coldingcode

Hi, @EightMonth. Thanks for the report, but this type of questions are better to be discussed at StackOverflow/Gitter. We use GitHub for features/bugs.

When you do open a new discussion, please share as much details as possible.

sabbyanandan avatar Jun 04 '19 14:06 sabbyanandan