Hi,
I’m trying to get clear on how to handle various cases in my BaseBasicBolt.
So far, I just have each bolt emit more tuples, pretty standard. But I still do that for the
last bolt in the topology. I’m not sure I should do that. Seems dirty.
Now, I have a case where I want a bolt to fail a tuple (skip all bolts after). I read that
I should just return without emitting any tuples and that functions as a fail. That seems
odd to me, that I should emit tuples at the end of my topology for success even when they
go nowhere, but not emit anything to show failure.
And then there’s always FailedException. Maybe I should forget all of this and just throw
that if I want to fail the tuple.
So what is the correct way to
1. Ack a tuple properly in the last bolt
2. Fail a tuple in the middle
Thanks!
|