Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

是否有函数或变量用来检测数据是否发送完成? #51

Open
yuxi-o opened this issue Nov 11, 2020 · 1 comment
Open

是否有函数或变量用来检测数据是否发送完成? #51

yuxi-o opened this issue Nov 11, 2020 · 1 comment

Comments

@yuxi-o
Copy link

yuxi-o commented Nov 11, 2020

当数据未发送完成producer就destroyed时,上报如下错误
result : 10, log bytes : 3675821, compressed bytes : 3685827, request id : , error message : producer is being destroyed, producer has no time to send this buffer out

除了“程序可靠退出方案”方案外,是否有其他函数或变量来检测数据是否发送完成?

因为log_producer_client_add_log()后执行destroy_log_producer()前时间无法预估,发送的数据大小无法预估,当数据量大时设置的时间总会超时。

@shabicheng
Copy link
Collaborator

可以等待packet_timeout / 1000 + connect_timeout_sec + send_timeout_sec + 1 时间,超过这个时间如果没有回调返回,那说明已经没有数据要发送

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants