You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "hamed-hatami (via GitHub)" <gi...@apache.org> on 2023/07/28 06:17:03 UTC

[GitHub] [camel] hamed-hatami commented on a diff in pull request #10870: kinesis connection retry mechanism added into the current consumer

hamed-hatami commented on code in PR #10870:
URL: https://github.com/apache/camel/pull/10870#discussion_r1277153554


##########
components/camel-aws/camel-aws2-kinesis/src/main/java/org/apache/camel/component/aws2/kinesis/Kinesis2Endpoint.java:
##########
@@ -99,12 +101,20 @@ public Producer createProducer() throws Exception {
 
     @Override
     public Consumer createConsumer(Processor processor) throws Exception {
-        final Kinesis2Consumer consumer = new Kinesis2Consumer(this, processor);
+        var kinesisConnection = KinesisConnection.getInstance();
+        final Kinesis2Consumer consumer = new Kinesis2Consumer(this, processor, kinesisConnection);
         consumer.setSchedulerProperties(getSchedulerProperties());
+        startHealthChecks(kinesisConnection);
         configureConsumer(consumer);
         return consumer;
     }
 
+    private void startHealthChecks(KinesisConnection kinesisConnection) {

Review Comment:
   What a great idea, I've changed the code according to your suggestion



-- 
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-unsubscribe@camel.apache.org

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