I use AWS-KINESIS endpoint in Camel to read from a AWS Kinesis contentstream. I can read messages just fine, but how do I checkpoint the message on the stream? In the standard AWS Kinesis Java client library you have the concept of Workers and Processors, but this is bypassed entirely in Camel it seems.
My route:
from("aws-kinesis://" + CONTENT_STREAM_NAME + "?amazonKinesisClient=#kinesisClient").
routeId(KINESIS_EVENT_READ).
bean(recordHandler);
In the recordhandler I would like to checkpoint the records when the record is processed correctly.
The RecordHandler's @Handler
@Handler
public void handleRecord(@Body Record record) {
processEvent(record); // I would like to checkpoint after this...
}
Any pointers?