mosquitto-dev team mailing list archive
-
mosquitto-dev team
-
Mailing list archive
-
Message #00014
Re: [Question #110463]: Max connections
Question #110463 on mosquitto changed:
https://answers.edge.launchpad.net/mosquitto/+question/110463
Status: Needs information => Open
Cyril Cauchois gave more information on the question:
Hello,
My tests are really simple.
I launch the mosquitto server (win32 binaries out of the box) on my PC.
And then I start a small java application built with the wmqtt library (provided by IBM).
This application does a simple loop like that :
for (int i=0; i < maxClient; i++) {
System.out.println("connecting client #"+i);
try {
clients[currentClient] = connectToBroker(hostname, port, prefixClient+currentClient);
clients[currentClient].subscribe(topics, qos);
Thread.sleep(sleepTime);
currentClient++;
} catch (MqttException e) {
e.printStackTrace();
break;
} catch (InterruptedException e) {
e.printStackTrace();
}
}
So ; just a connection and a suscribtion (only 1 topic). The connect
method is like that :
public static IMqttClient connectToBroker(String hostname, int port, String clientId) throws MqttException {
final String mqttConnSpec = "tcp://" + hostname + "@" + port;
IMqttClient mqttClient = MqttClient.createMqttClient(mqttConnSpec, null);
mqttClient.connect(clientId, true, (short)60);
return mqttClient;
}
The loop stops at connection #60 ; the server never respond to the connection.
I made the same test with rsmb under Linux (fedora), and the loop stops at connection #1020 (that might be a Linux issue)
Regards
--
You received this question notification because you are a member of
Mosquitto Dev, which is an answer contact for mosquitto.