Search code examples
javaspringrabbitmqspring-cloudspring-cloud-stream

How can I change default recovery interval for all RabbitMQ consumers in Spring Cloud Stream configuration?


Documentation states that the default recovery interval is 5000ms for RabbitMQ binder consumers.

RabbitMQ binder configuration properties are prefixed with spring.cloud.stream.rabbit.bindings.<channelName>.consumer.

recoveryInterval is a property with default value of 5000ms. I would like to be able to change it for all consumers in the configuration.

I tried spring.cloud.stream.rabbit.bindings.default.consumer.recoveryInterval=3000. It didn't work. It's still ~5000ms.

How can I change it?

Thanks


Solution

  • It's

    spring.cloud.stream.rabbit.default.consumer.recovery-interval=3000
    

    (no bindings.).

    What you have is configuration for a binding called default.