Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:40 Go to next message
Salim MANSOURI is currently offline Salim MANSOURIFriend
Messages: 1
Registered: July 2018
Junior Member
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,

Re: Wants to create multiple connections without too many threads [message #1795299 is a reply to message #1792065] Thu, 20 September 2018 05:27 Go to previous message
Ian Craggs is currently offline Ian CraggsFriend
Messages: 79
Registered: March 2013
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 05:32]

Report message to a moderator

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

Current Time: Wed Sep 22 03:22:36 GMT 2021

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

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

Back to the top