I found “Each word tuple is anchored by specifying the input tuple as the first 
argument to emit.”in the linked you gave. Does it mean the tuple I send will be 
anchored automatically?  And do I have to override the fail() method inside the 
spout? Or it will resend un-acked tuple automatically?

发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用

发件人: Navin Ipe<mailto:[email protected]>
发送时间: 2016年6月15日 18:59
收件人: [email protected]<mailto:[email protected]>
主题: Re: Messages lost when emitted from one bolt to another

Everyone faces this issue. That's why we anchor the tuples while emitting from 
the bolt, so that if it does not get delivered, the spout's fail() method will 
receive the failure notification. Make sure you anchor your 
tuples<http://storm.apache.org/releases/current/Guaranteeing-message-processing.html>
 and use the fail() method:

    @Override
    public void fail(Object msgId) {
        if (msgId instanceof MyClass) {
            MyClass one = (MyClass) msgId;
        }
}


On Wed, Jun 15, 2016 at 3:44 PM, Chen Junfeng 
<[email protected]<mailto:[email protected]>> wrote:
I found when I emit some messages from one bolt to another bolt, some of them 
are lost.

I counted the number of messages emitted in first bolt and the number of 
messages received in the beginning of excute() method in the second bolt. The 
two numbers should be equal but actually nearly half of them are lost.

Does anyone meet the similar problem?


发送自 Windows 10 版邮件<https://go.microsoft.com/fwlink/?LinkId=550986>应用




--
Regards,
Navin

Reply via email to