style95 commented on a change in pull request #4459: Close the consumer when 
WakeupExcpetion happened
URL: 
https://github.com/apache/incubator-openwhisk/pull/4459#discussion_r281887428
 
 

 ##########
 File path: 
common/scala/src/main/scala/org/apache/openwhisk/connector/kafka/KafkaConsumerConnector.scala
 ##########
 @@ -132,6 +132,11 @@ class KafkaConsumerConnector(
         } else {
           throw e
         }
+      case e: WakeupException =>
+        logging.info(this, s"WakeupException happened when do commit action 
for topic ${topic}")
+        close()
+        recreateConsumer()
 
 Review comment:
   I think `recreateConsumer()` already includes `consumer.close()`?
   
https://github.com/apache/incubator-openwhisk/pull/4459/commits/4e9541a16cf26b67cc4e1e5d0a8fcafa0b599d74#diff-8bf7d87d98238d39ba7f36d2c52def6fL171

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to