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/01/17 11:29:43 UTC

[GitHub] [camel] orpiske commented on a change in pull request #6755: CAMEL-17493: ignore safe exceptions when unsubscribing

orpiske commented on a change in pull request #6755:
URL: https://github.com/apache/camel/pull/6755#discussion_r785888023



##########
File path: components/camel-kafka/src/main/java/org/apache/camel/component/kafka/KafkaFetchRecords.java
##########
@@ -242,6 +242,8 @@ private void handleAccordingToStrategy(long partitionLastOffset, Exception e) {
     private void safeUnsubscribe() {
         try {
             consumer.unsubscribe();
+        } catch (IllegalStateException e) {
+            LOG.warn("The consumer is likely already closed. Skipping the unsubscription");

Review comment:
       Thanks, I think that's a good idea. I am on my way back home, so I take a look tomorrow to see what we can print.




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