2

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?

4

1 回答 1

4

适用于 Camel 的 AWS-KINESIS 当前使用AWS 开发工具包的同步 Kinesis 部分。您所指的工作人员、处理器和检查点来自 KCL(Kinesis 客户端库),这是一种更高级的访问 Kinesis 的方式(包括每个分区的线程和检查点)。Camel 似乎还没有基于 KCL 的消费者组件,也没有相应的基于 KPL 的生产者组件。

于 2018-03-20T19:18:22.983 回答