0

I have a configuration similar to the following for my Kinesis stream:

spring:
  cloud:
    function:
      definition: personEvent
    stream:
      bindings:
        personEvent-in-0:
          consumer:
            back-off-initial-interval: 1000
            back-off-max-interval: 10000
            back-off-multiplier: 2.0
            max-attempts: 3
          content-type: application/*+avro
          destination: dev-people-request
          error-handler-definition: myDefaultErrorHandler
          group: my-service-people-request

When I create an integration test using the following test binder dependency, I see that upon a stream processing exception, three retries are attempted.

<dependency>
  <groupId>org.springframework.cloud</groupId>
  <artifactId>spring-cloud-stream</artifactId>
  <classifier>test-binder</classifier>
  <type>test-jar</type>
  <scope>test</scope>
</dependency>

However, when I deploy my service to AWS, the retries are not attempted at all. Is there a configuration property I need to add that is missing? Furthermore, does the Spring Cloud Stream Binder for Kinesis 2.2.0 honor the consumer retry configuration I have specified above?

My microservices use Spring Cloud 2021.0.6, Spring Boot 2.7.10, and Spring Cloud Stream Binder for Kinesis 2.2.0.

Keith Bennett
  • 733
  • 11
  • 25

0 Answers0