You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@storm.apache.org by "Tao, Jing" <jt...@webmd.net> on 2014/08/01 20:14:42 UTC
KafkaSpout fail method - how to distinguish between exception and
timeout?
Hello,
I am using KafkaSpout from storm-kafka-0.8-plus:0.4.0.jar. The fail method of this Spout replays the message infinitely till the tuple somehow gets processed successfully. Instead of replaying tuples that caused exceptions, I want to log and skip them. However, if a tuple failed due to a timeout (not due to an exception), then I do want to replay it. How can I do this?
Would I have to have a try/catch block in each bolt to catch any runtime exceptions and log the error but ack the tuple anyway? Or is there a better way to distinguish between an exception failure vs a timeout failure?
Thanks,
Jing