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_r281472266
##########
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:
In normal situation, when one consumer is closed, we need to create a new
one.
But here, the user has a clear purpose: `close the consumer gracefully using
consumer.wakeup` and have no purpose to create a new consumer again.
----------------------------------------------------------------
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