Search in sources :

Example 1 with PutRecordResult

use of com.amazonaws.services.kinesis.model.PutRecordResult in project camel by apache.

the class KinesisProducer method process.

@Override
public void process(Exchange exchange) throws Exception {
    PutRecordRequest request = createRequest(exchange);
    PutRecordResult putRecordResult = getEndpoint().getClient().putRecord(request);
    Message message = getMessageForResponse(exchange);
    message.setHeader(KinesisConstants.SEQUENCE_NUMBER, putRecordResult.getSequenceNumber());
    message.setHeader(KinesisConstants.SHARD_ID, putRecordResult.getShardId());
}
Also used : PutRecordResult(com.amazonaws.services.kinesis.model.PutRecordResult) Message(org.apache.camel.Message) PutRecordRequest(com.amazonaws.services.kinesis.model.PutRecordRequest)

Aggregations

PutRecordRequest (com.amazonaws.services.kinesis.model.PutRecordRequest)1 PutRecordResult (com.amazonaws.services.kinesis.model.PutRecordResult)1 Message (org.apache.camel.Message)1