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

Cannot establish different mqtt connections in loops #143

Open
yongweizhao opened this issue Aug 3, 2023 · 2 comments
Open

Cannot establish different mqtt connections in loops #143

yongweizhao opened this issue Aug 3, 2023 · 2 comments

Comments

@yongweizhao
Copy link

我想测试这样一种情况:循环3次,每次创建5个mqtt连接。
自增计数器:
image
mqtt-connect:
image
结果:
image
image
在单次线程组中自增id没有起作用
即:在第一次循环中,线程池创建了三个client并有对应的命名clientId,在后面的两次循环中,创建的client跟第一次的clientId完全一样,这与预期的每次循环创建新的连接不符。

@yongweizhao
Copy link
Author

补充:用的最新的2.0版本插件,eqmx版本V4.4

@chongyuanyin chongyuanyin changed the title 无法在线程组循环创建mqtt连接 Cannot establish different mqtt connections in loops Jan 2, 2024
@chongyuanyin
Copy link
Member

In the current implementation, the established connection in the same thread will be reused. Please try creating connections in multiple threads

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