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

跨节点数据同步消息同步丢数据,并且大概率会导致服务阻塞后续的pub无法同步到其他节点 #66

Closed
chenshan911210 opened this issue Aug 7, 2023 · 3 comments

Comments

@chenshan911210
Copy link

我这里目前部署的是3个节点,单节点消息pub、sub没有任何问题,但是跨节点就会出现pub之后丢消息,消息丢失之后导致多借点之间数据同步阻塞后续消息无法pub同步到其他节点。
节点配置如下
节点1:
image
节点2:
image
节点3:
image

我这里测试使用的是mqtt-stresser作为测试客户端。
测试命令为./build/mqtt-stresser-linux-amd64 -log-level=0 -broker=tcp://127.0.0.1:1887 -broker-sub=tcp://127.0.0.1:1885 -num-clients=1 -num-messages=25
其中-broker-sub 为我自己加的一个配置,专门用于测试夸节点消息同步是否可能会丢消息。
目前测试发现一般情况下-broker-sub 小于20大概率不会有问题,超过20消息必丢。
pub节点日志
image
sub节点日志
image

麻烦大佬帮忙看看是否为我的配置存在问题导致的消息丢失

@wind-c
Copy link
Owner

wind-c commented Aug 7, 2023

目前测试发现一般情况下-broker-sub 小于20大概率不会有问题,超过20消息必丢。

这句话啥意思?

@chenshan911210
Copy link
Author

抱歉,那个地方写的有问题, 是-num-messages=这个值小于20的情况下不会丢,大于25之后是必丢

@wind-c
Copy link
Owner

wind-c commented Aug 10, 2023

截屏2023-08-10 12 14 19 测试client连到1885 broker,在1887的broker上订阅filter=internal/mqtt-stresser/narwaldeMacBook-Pro.local/# ,90条消息全部接到

@wind-c wind-c closed this as completed Aug 29, 2023
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