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/14 13:48:56 UTC

[GitHub] [camel] orpiske commented on pull request #6751: CAMEL-17489: camel-kafka - Unsubscribe before closing the consumer

orpiske commented on pull request #6751:
URL: https://github.com/apache/camel/pull/6751#issuecomment-1013132826


   > I think `safeUnsubscribe` should be made _safe_ and deal with already closed, eg kafka throws this
   > 
   > ```
   >     private void acquireAndEnsureOpen() {
   >         acquire();
   >         if (this.closed) {
   >             release();
   >             throw new IllegalStateException("This consumer has already been closed.");
   >         }
   >     }
   > ```
   > 
   > eg make safeUnsubscrive catch IllegalStateException and ignore that
   
   Yeah, I think it may be OK to ignore the `IllegalStateException` in this specific case. I think there are other issues that could happen during unsubscribe, so we need to be careful to ignore only that IMHO.


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