Unable to get more than 250 mqtt connection

54 views
Skip to first unread message

Praveenkumar Vijayakumar

unread,
Oct 12, 2022, 3:45:02 AM10/12/22
to MQTT
Hi all,

I have used paho mqtt for mqtt connection. In I ran with 500 MQTT clients only 250 only got connections and the rest all not get connections after I started the loop_start().
You guys can you help me out of that
I need to make more than 1000 clients connection in a single machine

If I haven't used the loop start function, then it makes all 1000 MQTT connections, only when I used loop start after that it able to publish all the 1000 clients' return codes as (0,2) but I only received 250 messages. If the publish return code is (0, 2 ) means the published successfully right, but it was not received all the published messages.

Domenico Briganti

unread,
Oct 12, 2022, 3:49:23 AM10/12/22
to mq...@googlegroups.com
Hi Praveenkumar,
 it's not clear what you are doing. Which broker? Are the clients in the same machine? 500 clients means 500 jvm?

Regards,
Domenico



Il 12/10/22 09:45, 'Praveenkumar Vijayakumar' via MQTT ha scritto:
Disclaimer: The content of this email is confidential and intended for the recipient specified in message only. If you have received this email by mistake, please delete it from your mailbox, and do not forward it or any part of it to anyone else.
Warning: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email. --
To learn more about MQTT see https://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mqtt/5e35fbd1-6962-49c1-a3e6-0d22f7da1550n%40googlegroups.com.


Praveenkumar Vijayakumar

unread,
Oct 12, 2022, 3:56:22 AM10/12/22
to mq...@googlegroups.com
Hi Domenico,
I have used aws endpoint for mqtt connection. For that, I have tried 500 clients to make an MQTT connection to publish and subscribe to receive a message. Actually, I can able to simulate 250 clients to make mqtt connection and subscription to receive messages. 

When i go for more than 250 clients to make connection, the connection has been established. But when using loop start function for callback to received message. After only i got to know, only 250 clients only able to publish messages to the broker.





--

Thanks & Regards




Praveen Kumar V

Associate Quality Engineer

Rently Software Development Pvt Ltd. India

Ph: (+91) 8637478137


Self-Tours. Smart Doors.

Smart Communities.

Praveenkumar Vijayakumar

unread,
Oct 12, 2022, 4:05:27 AM10/12/22
to mq...@googlegroups.com
Hi,
 kindly refer to this link mqtt-client
Based on this only I have implemented the code for publishing and subscribing. 


Andy Piper

unread,
Oct 12, 2022, 3:31:26 PM10/12/22
to mq...@googlegroups.com
It sounds like you need to identify which broker you are using (you mentioned something about AWS? Does that have any configuration options?). You may be able to find more help from the community involved with that product or project.



--
Andy Piper | Kingston upon Thames, London (UK)
links: https://andypiper.me  | twitter: @andypiper 

Praveenkumar Vijayakumar

unread,
Oct 13, 2022, 2:44:21 AM10/13/22
to mq...@googlegroups.com
That is actually the AWS IoT endpoint(Broker). We are using MQTT connection using tls set certificate to make mqtt connection.
The main problem that I facing is only a 250 MQTT connection only able to be established. Because of the loop_start() call-back function I am not able to make more than 250 connections. Can you guys have a solution for this?

If I am not using the loop_start() function, it won't enable the call function for receiving messages. How can I handle this?
If I use the loop_start() function, it only makes 250 connections. I need more than 250 MQTT clients to make mqtt connection for publishing and receiving.

Gambit Communications

unread,
Oct 18, 2022, 7:14:08 AM10/18/22
to MQTT
You will have a hard time getting support on an open-source API unless you post code.
We routinely do thousands and even hundreds of thousands of connections to a variety of
brokers, eg. as shown in this blog post

Reply all
Reply to author
Forward
0 new messages