A coworker & I are debating this code:
----------
try {
...
} catch(Exception e) {
collector.fail(tuple);
}
collector.ack(tuple);
-----------
His claim is ack() is acknowledgement of end of processing. E.g. you
ALWAYS have to call ack() (to stop the implicit timeout you're working
against), and if you want to fail() you should call it before the ack()
(e.g. the code above).
My claim is fail() "is a" ack in the sense of it being an acknowledgement,
an acknowledgement of failure. Thus the ack() should be before the catch,
and Bolts should end with one or the other, but not both.
A followup question if I'm right: what does Storm do when a bolt calls
fail() and ack() on the same tuple? :-)
will