i want to make stress test on mosquitto, so i create some code as below
for (int i = 0; i < 800; i++) {
final int j = i;
Thread t = new Thread
The solution is add MqttClient.generateClientId
MemoryPersistence persistence = new MemoryPersistence()
MqttClient client = new MqttClient("tcp://192.168.88.203",MqttClient.generateClientId(),persistence);
client.connect();
or
MqttClient client = new MqttClient("tcp://192.168.88.203", MqttClient.generateClientId+SERVER_CLIENTID_PREFIX)
The identifier must be random. I had this problem in scala and that was my solution.