yes that is correct.

Two quick points:
1.  If you are not going to use the fail method for some kind of reply then
you probably should not anchor your tuples as storm runs a little bit
faster if reply framework is not used.
2. The timeout setting is configurable so you can set it to be more then 30
seconds if your process takes more time.


On Wed, Jul 23, 2014 at 10:46 PM, Chen Wang <chen.apache.s...@gmail.com>
wrote:

> So if my downstream bolt is doing some time consuming task after receiving
> a signal(tuple) from the spout. e.g:
>
>  public void execute(Tuple tuple) {
>         String sentence = tuple.getString(0);
>         while(){
>
>             // time consuming job
>
>         }
>         _collector.ack(tuple);
>     }
>
> if the while loop takes longer than the specified time(30s), then the storm 
> will consider the signal failed and the .fail() will be called in the spout. 
> Is that correct? Whether the tuple will be replayed or not entirely depends 
> on my implementation in fail()?
>
> Another case, if I move _collector.ack(tuple); before the while loop, then 
> the storm will consider the tuple at least succeeded already on this bolt? 
> Even in while loop there is exception thrown, the fail() will not be called 
> on spout. Is that right?
>
> Thanks,
>
> Chen
>
>
>
>
>
> On Wed, Jul 23, 2014 at 6:22 PM, Naresh Kosgi <nareshko...@gmail.com>
> wrote:
>
>> All reply's occur from the spout.  Think of what you emit from the spout
>> as your root tuple and all other tuples generated from that tuple as child
>> tuples. If any downstream tuples fail you can code to reemit the same tuple
>> again from your spout and reply the entire set.  There is no way I know of
>> to reply just the bolt tuples.
>>
>> When all downstream processing is complete the ack method in the spout is
>> called by the storm framework and fail is called when one of the tuples
>> downstream fails/timesout.  Storm provides you a framework to setup reply
>> but it is you as a developer that needs to code for it.
>>
>> Hope this helps
>>
>>
>> On Wed, Jul 23, 2014 at 9:13 PM, Chen Wang <chen.apache.s...@gmail.com>
>> wrote:
>>
>>> Guys,
>>> i am a bit confused about the fault tolerance feature of storm. I have
>>> read
>>>
>>> https://storm.incubator.apache.org/documentation/Guaranteeing-message-processing.html
>>>
>>> My question is, if a bolt failed with some runtime exception, does it
>>> means that the tuple is failed and the same tuple sent to this bolt will be
>>> replayed again? Or it means that the message has been processed although it
>>> failed. It already met the "at least one" processing, and will not be
>>> replayed.
>>> Or it depends on how and when I call .ack and .fail?
>>>
>>> Also about replaying message if time out, does it mean that if a
>>> downstream bolt takes more than the specified time out, the message will be
>>> replayed? Or its again depending on when I call ack and fail..
>>>
>>> Thanks for clarification.
>>> Chen
>>>
>>
>>
>

Reply via email to