0
votes

I have a mqtt java code (paho) written which works fine when it attempts to connect to Mosquitto broker. It is able to establish, publish all messages to a topic. But with MQXR (broker included with MQ), I get

SEVERE: Could not connect to MQTT broker, requests may be lost. Connection lost (32109) - java.io.EOFException at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:138) at java.lang.Thread.run(Thread.java:736) Caused by: java.io.EOFException at java.io.DataInputStream.readByte(DataInputStream.java:250) at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:56) at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:100) ... 1 more

The QoS is set as 2. Not able to find why it fails in MQXR? Any thoughts is greatly appreciated.

Thanks

1
Have you looked at the logs on the broker side?hardillb
No. I have not. I requested for the logs. Meanwhile I wanted to know if there is any known issues that paho mqtt will fail to connect. I read in some other forums that QoS=2 will cause issues with RabbittMQ.A Rao

1 Answers

0
votes

There are two possibilities for losing connection:
1. Some MQTT Brokers will not support QOS-2 Implementations like Azure IoT-Hub. Verify that your broker supports QOS-2.
2. What Port are you connecting to?. If its SSL/TLS encrypted, then you cannot connect with unencrypted connect process. You have to enable SSL connection using bouncycastle during your connect process.