Reputation: 947
Through testing of our microservices that utilize Spring Cloud Stream, we have verified that the configuration below is not honored by the Spring Cloud Stream Binder for AWS Kinesis when exceptions are encountered during stream processing (i.e., stream processing is not retried at all). When using the same configuration with the Spring Cloud Stream Kafka Binder configured, when exceptions are thrown, the consumer processing is retried.
spring:
cloud:
stream:
bindings:
bindingName:
binder: kinesis
consumer:
back-off-initial-interval: 1000
back-off-max-interval: 1000
back-off-multiplier: 2.0
max-attempts: 5
Is there a reason why the Spring Cloud Stream Binder for AWS Kinesis does not honor these Spring Cloud Stream Consumer properties? Is the intent for the binder to implement them?
Upvotes: 0
Views: 119
Reputation: 121560
There is no delivery retry feature in the KinesisMessageDrivenChannelAdapter
. At the moment when we implemented it we realized that this functionality simply can be achieved with a RequestHandlerRetryAdvice
on the consumer endpoint of the output channel for this KinesisMessageDrivenChannelAdapter
. The retry functionality in Kafka binder is done in the AbstractRetryingMessageListenerAdapter
which is outside of Spring Integration scope and does exactly the same what we can with the mentioned RequestHandlerRetryAdvice
or @Retryable
on the service activator method.
Upvotes: 1