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/07 07:53:17 UTC

[GitHub] [camel] jylipaa opened a new pull request, #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

jylipaa opened a new pull request, #8492:
URL: https://github.com/apache/camel/pull/8492

   Invoke asynchronous methods and subscribe to them instead of calling blocking methods.
   
   https://issues.apache.org/jira/browse/CAMEL-18596
   
   
   


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


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

Posted by GitBox <gi...@apache.org>.
orpiske commented on PR #8492:
URL: https://github.com/apache/camel/pull/8492#issuecomment-1274645554

   > ❌ Finished component verification: **1 component(s) test failed** out of 1 component(s) tested
   
   Please, can you rebase the code with the latest changes from main, so it can be tested automatically? Thanks!


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


[GitHub] [camel] github-actions[bot] commented on pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8492:
URL: https://github.com/apache/camel/pull/8492#issuecomment-1278498317

   ### Components tested:
   
   | Total | Tested | Failed :x: | Passed :white_check_mark: | 
   | --- | --- | --- |  --- |
   | 1 | 1 | 0 | 1 |


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
davsclaus commented on code in PR #8492:
URL: https://github.com/apache/camel/pull/8492#discussion_r993434475


##########
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:
   Since the callback is async then in case of an error, then storing that on the exchange does not make sense as the exchange would likely no longer be in use. Instead the error should be logged, or better yet processed by exception handler on the consumer - there should be a getExceptionHandler.handleException(...) 



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


[GitHub] [camel] github-actions[bot] commented on pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8492:
URL: https://github.com/apache/camel/pull/8492#issuecomment-1271243828

   :warning: This PR changes Camel components and will be tested automatically.


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


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

Posted by GitBox <gi...@apache.org>.
oscerd commented on code in PR #8492:
URL: https://github.com/apache/camel/pull/8492#discussion_r989828640


##########
components/camel-azure/camel-azure-eventhubs/src/test/java/org/apache/camel/component/azure/eventhubs/EventHubsCheckpointUpdaterTimerTaskTest.java:
##########
@@ -0,0 +1,44 @@
+package org.apache.camel.component.azure.eventhubs;

Review Comment:
   Please add license header



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


[GitHub] [camel] github-actions[bot] commented on pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8492:
URL: https://github.com/apache/camel/pull/8492#issuecomment-1271468853

   :x: Finished component verification: **1 component(s) test failed** out of 1 component(s) tested


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


[GitHub] [camel] github-actions[bot] commented on pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #8492:
URL: https://github.com/apache/camel/pull/8492#issuecomment-1274765323

   :heavy_check_mark: Finished component verification: 0 component(s) test failed out of **1 component(s) tested**


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


[GitHub] [camel] davsclaus merged pull request #8492: CAMEL-18596: Use async checkpoint updating method from Azure EventCon…

Posted by GitBox <gi...@apache.org>.
davsclaus merged PR #8492:
URL: https://github.com/apache/camel/pull/8492


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