Skip to content
Advertisement

MQTT and SpringBoot Integration Connection Lost

I currently have an API in SpringBoot and I would like to add an MQTT client to subscribe to one or more topics. I tried several Paho,Hive clients, without success, I’m currently on the default MQTT of SpringBoot which uses Paho but I can’t get it to work even with the basic configuration. I get a “Connection Lost” error as soon as I launch the application… Can you tell me a fix or something else that would work. Thanks! Mosquitto is running on windows for testing

Maven :

JavaScript
JavaScript

The error on run :

JavaScript

More log

Advertisement

Answer

Answer : This works with MqttOptions defined !

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement