fanyang commented on code in PR #14238:
URL: https://github.com/apache/camel/pull/14238#discussion_r1614642796


##########
components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Producer.java:
##########
@@ -47,11 +53,28 @@ public Kinesis2Endpoint getEndpoint() {
 
     @Override
     public void process(Exchange exchange) throws Exception {
+        Exception exceptionThrownByPutRecord = this.exceptionThrownByPutRecord;
+        if (exceptionThrownByPutRecord != null) {
+            this.exceptionThrownByPutRecord = null;
+            throw exceptionThrownByPutRecord;
+        }
+
         PutRecordRequest request = createRequest(exchange);
-        PutRecordResponse putRecordResult = 
connection.getClient(getEndpoint()).putRecord(request);
-        Message message = getMessageForResponse(exchange);
-        message.setHeader(Kinesis2Constants.SEQUENCE_NUMBER, 
putRecordResult.sequenceNumber());
-        message.setHeader(Kinesis2Constants.SHARD_ID, 
putRecordResult.shardId());
+        if (getEndpoint().getConfiguration().isAsyncClient()) {

Review Comment:
   Thanks for the comments. Keep using synchronous client.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to