Thanks for settling the bet!

will

On Wed, Nov 12, 2014 at 4:53 PM, Vladi Feigin <[email protected]> wrote:

> Hi
> It doesn't make sense to call both on the same tuple
> Vladi
>
> On Wed, Nov 12, 2014 at 11:19 PM, William Oberman <
> [email protected]> wrote:
>
>> 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
>>
>
>

Reply via email to