Wants to create multiple connections without too many threads [message #1792065] |
Tue, 10 July 2018 12:40  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03573 seconds