We recently encountered a condition where during the checkpointing of user records, an HTTP connection exception was encountered, and the remaining user records were skipped over. Thus, we effectively lost these user records as processing of the remaining records wasn't retried. We are trying to figure out why this occurred, but this thread indicates that user records are skipped by default, something very concerning to us as we can not afford to lose any messages. We currently have spring.cloud.stream.kinesis.bindings.myConsumer.consumer.checkpoint-mode=record
and spring.cloud.stream.kinesis.bindings.myConsumer.consumer.listener-mode=record
. The stack trace is attached for reference purposes.
My question is whether setting spring.cloud.stream.kinesis.bindings.myConsumer.consumer.checkpoint-mode=batch
would help alleviate this possibility of losing user records since all records are processed before a checkpoint is performed (as seen in the source code), so that either all of the records are checkpointed, or none of them are.