Skip to content
Advertisement

Tag: mqtt

HiveMQ Java library fails to automatically reconnect to broker

I’m using the HiveMQ library in my Java Spring application to connect to a Mosquitto instance as I find it more user-friendly compared to the Paho client. But something is going wrong with the automatic reconnection. From time to time the connection is lost and the application doesn’t succeed in reconnecting (see logs 1). This can also be triggered by

Java Paho MQTT client connection over reverse proxy

I’m using the Java paho library to communicate to an mqtt broker. Using the code below I’m able to connect fine. However, I have the mqtt broker behind a reverse proxy, so I don’t need to open up a separate port. So what I need to do is instead of connecting to “tcp://192.168.1.100:1883” I’d like to connect to “tcp://192.168.1.100/mqtt”. However,

How to fix “javax.net.ssl.SSLHandshakeException: TLS Server certificate issued after 2019-04-16 and anchored by a distrusted legacy Symantec root CA”

I got the exception below while connecting to a MQTT Server with Java and self signed certificates. I used VeriSign-Class 3-Public-Primary-Certification-Authority-G5.pem as cacert.pem. The code is for an Linux server but currently I’m programming it on IntelliJ IDEA. The output is: I tried to connect to the server with MQTT.fx (Windows program) and it worked. Hope you can help me.

Advertisement