alexCajas/EmbeddedMqttBroker

increase the possible mqtt connection from 9 to 16 not possible

Closed this issue · 1 comments

the default configuration fo the example is 9 possilbe connections this works great. if i decrease to 4 connections the broker allows max of 4. however if i increase to 16 i still can connect 9 mqtt clients.

Hi!, your right, I tested the project again and the limit is 10 now, probably when I wrote this project some years ago, arduino core for esp32 did let us to open 16 TCP sockets, but with the recent releases the limit is 10 sockets, in your case, 1 TCP socket for listen and 9 for clients. If you use broker and http server at the same time you are using 1 TCP socket to listen on the broker and other to listen on the web server, letting you 8 sockets for clients.
I was looking for similars isues in espressif github page and I found this: espressif/esp-idf#4900, this isue is from 2020, and it talk about 16 TCP connections, probably some release of that year includes a version of lwIp library, which accepts 16 TCP sockets.