apache风暴可靠性超时配置 [英] apache storm reliablity timeout configuration

查看:69
本文介绍了apache风暴可靠性超时配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux Ubuntu中部署了一个nodejs-> kafka> storm-> Mongo.原来一切正常.然后,我更改了Storm Worker中的方法,这使Storm Worker处理消息非常缓慢,每条消息大约1分钟,我注意到该消息是从Storm一次又一次发送的.我回到原来的方法,一切都很好. (原始方法的处理时间为每条消息90ms).

I have a nodejs->kafka>storm->Mongo deployed in Linux Ubuntu. Everything is normal originally. Then I changed the method in storm worker which makes storm worker process message very slow, around 1 minute per message, I notice the message is sent again and again from storm. I revert back to original method, everything is fine. (original method process time is 90ms per message).

我想这就是Storm的可靠性.当消息未确认或超时时,它将再次发送消息.

I guess this is Storm reliability come into player. When message is not acknowledged, or time out, it sends message again.

如果我的猜测正确,那么如何配置此超时时间?

If my guess is right, how to configure this timeout?

如果我的猜测是错误的,为什么同一封邮件发送两次或三遍?

If my guess is wrong, why same message is sent twice or three times?

推荐答案

您可以通过配置参数Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS设置超时.请参见 https://storm.apache.org/javadoc/apidocs/backtype/storm/Config.html#TOPOLOGY_MESSAGE_TIMEOUT_SECS

You can set the timeout via configuration parameter Config.TOPOLOGY_MESSAGE_TIMEOUT_SECS. See https://storm.apache.org/javadoc/apidocs/backtype/storm/Config.html#TOPOLOGY_MESSAGE_TIMEOUT_SECS

默认值为30秒,请参见此处的defaults.yaml: https ://github.com/apache/storm/blob/master/conf/defaults.yaml

The default value is 30 seconds, see defaults.yaml here: https://github.com/apache/storm/blob/master/conf/defaults.yaml

# maximum amount of time a message has to complete before it's considered failed
topology.message.timeout.secs: 30

当一个元组失败时,它应该显示在Storm UI中并且也应该被记录(也许您需要调整日志级别).因此,您可以仔细检查元组是否超时.

When a tuple fails, it should show up in Storm UI and should be logged, too (maybe you need to adjust log level). So you can double check if a tuple times out or not.

这篇关于apache风暴可靠性超时配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆