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 2021/06/02 09:48:39 UTC

[GitHub] [camel] electrosaur opened a new pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

electrosaur opened a new pull request #5617:
URL: https://github.com/apache/camel/pull/5617


   In the synchronous consumer, catch and log retryable ApiException-s in addition to IOExcepion-s.
   The synchronous consumer will still die on all other exceptions.


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

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



[GitHub] [camel] electrosaur commented on a change in pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

Posted by GitBox <gi...@apache.org>.
electrosaur commented on a change in pull request #5617:
URL: https://github.com/apache/camel/pull/5617#discussion_r643816975



##########
File path: components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
##########
@@ -177,6 +178,12 @@ private void synchronousPull(String subscriptionName) {
                     }
                 } catch (IOException e) {
                     localLog.error("Failure getting messages from PubSub", e);
+                } catch (ApiException e) {

Review comment:
       @omarsmak Yes, all of the 5xx errors are retryable per https://cloud.google.com/pubsub/docs/reference/error-codes. I initially thought of checking if `e.getStatusCode()` was 5xx, but this seemed better.




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

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



[GitHub] [camel] omarsmak commented on a change in pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5617:
URL: https://github.com/apache/camel/pull/5617#discussion_r643806108



##########
File path: components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
##########
@@ -177,6 +178,12 @@ private void synchronousPull(String subscriptionName) {
                     }
                 } catch (IOException e) {
                     localLog.error("Failure getting messages from PubSub", e);
+                } catch (ApiException e) {

Review comment:
       Is this exception corresponds to 500 error?




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

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



[GitHub] [camel] omarsmak commented on a change in pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

Posted by GitBox <gi...@apache.org>.
omarsmak commented on a change in pull request #5617:
URL: https://github.com/apache/camel/pull/5617#discussion_r643887464



##########
File path: components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
##########
@@ -177,6 +178,12 @@ private void synchronousPull(String subscriptionName) {
                     }
                 } catch (IOException e) {
                     localLog.error("Failure getting messages from PubSub", e);
+                } catch (ApiException e) {

Review comment:
       perfect 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.

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



[GitHub] [camel] davsclaus merged pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

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


   


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

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



[GitHub] [camel] electrosaur commented on a change in pull request #5617: CAMEL-16263 camel-google-pubsub - Consumer does not recover from 500 series error from Google

Posted by GitBox <gi...@apache.org>.
electrosaur commented on a change in pull request #5617:
URL: https://github.com/apache/camel/pull/5617#discussion_r643816975



##########
File path: components/camel-google/camel-google-pubsub/src/main/java/org/apache/camel/component/google/pubsub/GooglePubsubConsumer.java
##########
@@ -177,6 +178,12 @@ private void synchronousPull(String subscriptionName) {
                     }
                 } catch (IOException e) {
                     localLog.error("Failure getting messages from PubSub", e);
+                } catch (ApiException e) {

Review comment:
       @omarsmak Yes, all of the 5xx errors are retryable per https://cloud.google.com/pubsub/docs/reference/error-codes. I initially thought of checking if `e.getStatusCode()` was 5xx, but this seeed better.




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

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