Skip to main content



      Home
Home » Eclipse Projects » Paho » Wants to create multiple connections without too many threads(I want to create many MQTT connections but with limitted threads)
Wants to create multiple connections without too many threads [message #1792065] Tue, 10 July 2018 12:40 Go to next message
Eclipse UserFriend
Hi everyone,

We are building a Performance Test system were we need to simulate 30K connections (Kept alive).

Within one Client thread, we want to manage 100 MQTT connections.
As we noticed, every time we create a connection, 3 threads are associated with that connection. We want to manage those 100 connections with limited threads.

Should we create our own Executor to be passed to the constructor of the MqttClient ?

Would appreciate any link or discussion around this subject.

Thanks a lot for your help,

Salim.
Re: Wants to create multiple connections without too many threads [message #1795299 is a reply to message #1792065] Thu, 20 September 2018 01:27 Go to previous message
Eclipse UserFriend
Yes, as you found out, that is a characteristic of the Paho Java client. I'm not sure that your own executor would change that behaviour. The Java client library was not primarily intended for high performance, so maybe this is not the best way to use it.

The C clients use a few threads to manage all the connections created, so maybe you could look to use one of those. However, they do use a select system call, so are limited to 1024 TCP connections per process. To get up to 30,000 you would need multiple processes. You may need to create your own bespoke client for this purpose. If you did this, you can reuse some of the Paho client MQTT serialization code, in Java or C or other language which suits you.

[Updated on: Thu, 20 September 2018 01:32] by Moderator

Previous Topic:Public multiples topic to Mosquitto server using Paho C library
Next Topic:Visual Studio 2017 CrossCompile
Goto Forum:
  


Current Time: Fri Jul 11 07:45:03 EDT 2025

Powered by FUDForum. Page generated in 0.03573 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top