简体   繁体   中英

MQTT RSMB and mosquitto max connection

我的应用程序中有超过20,000个用户,有时我必须向所有客户端推送一些味精,例如新闻,i代码,同时(i <100000)测试与mqtt服务器的最大连接,而当i = 1018时,rsmb不能连接,并运行相同的代码以连接mosquitto,i = 4000 +,但不支持超过10,000个客户端,我尝试了很多方法,但没有结果,请帮忙。

In mosquitto you're hitting the maximum open file limit imposed by your operating system. If you're running on Linux you'll need to look at the limits.conf man page under the "nofiles" entry as well as "ulimit -n". You can see current limits with "ulimit -a".

I believe rsmb is limited to approximately 1000 clients but you should take notice of its licence which states it is for evaluation only.

If you are using mosquitto on linux or ubuntu , you might need to use mosquitto.conf to define the number of connection

The maximum number of client connections to allow is as per listener setting. Default is -1, which means unlimited connections. Note that other process limits mean that unlimited connections are not really possible. Typically the default maximum number of connections possible is around 1024 .

max_connections -1

If you want to go past this , you might need to use a scalable message broker . Some of the products like IBM message sight ,say that they offer this scalable .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM