openwhisk-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-openwhisk] ningyougang commented on a change in pull request #4459: Close the consumer when WakeupExcpetion happened
Date Tue, 07 May 2019 06:27:14 GMT
ningyougang commented on a change in pull request #4459: Close the consumer when WakeupExcpetion
happened
URL: https://github.com/apache/incubator-openwhisk/pull/4459#discussion_r281475761
 
 

 ##########
 File path: common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaConsumerConnector.scala
 ##########
 @@ -132,6 +132,10 @@ class KafkaConsumerConnector(
         } else {
           throw e
         }
+      case e: WakeupException =>
+        logging.info(this, s"WakeupException happened when do commit action for topic ${topic}")
+        close()
 
 Review comment:
   Oh, in current github master branch, has no any part that user explicitly close this consumer
using wakeup().
   
   Maybe one day in future, for some special scene, may expose a public method `wakup()` in
KafkaConsumerConnector. (if wakup is not called forever, this patch's catch statement will
not happen forever also)
   
   I added this patch,  just for  `future expansion`.

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


With regards,
Apache Git Services

Mime
View raw message