You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/13 16:06:09 UTC

[GitHub] [camel] jylipaa commented on a diff in pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

jylipaa commented on code in PR #8492:
URL: https://github.com/apache/camel/pull/8492#discussion_r994849435


##########
components/camel-azure/camel-azure-eventhubs/src/main/java/org/apache/camel/component/azure/eventhubs/EventHubsConsumer.java:
##########
@@ -173,7 +173,12 @@ private void processCommit(final Exchange exchange, final EventContext eventCont
         try {
             var completionCondition = processCheckpoint(exchange);
             if (completionCondition.equals(COMPLETED_BY_SIZE)) {
-                eventContext.updateCheckpoint();
+                eventContext.updateCheckpointAsync()
+                        .subscribe(unused -> LOG.debug("Processed one event..."), error -> {
+                            LOG.debug("Error when updating Checkpoint: {}", error.getMessage());
+                            exchange.setException(error);

Review Comment:
   I decided to just log the error. Going deeper seems to be out of my experience level within this matter..



-- 
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