I don’t use Things in AWS IoT Core, but I do use MQTT on a private server.
Firstly I setup my MQTT Subscribe in an AfterStartup microflow so it should always be listening. I set the Broker host, Broker port, Timeout, Topic Name, On Message Microflow, and Qo s. The other fields I set to empty as I didn’t need them.
My On Message Microflow accepts two String parameters – Payload and Topic. This will be your incoming message from MQTT.
When I want to publish a message I use MQTT Publish. I set Broker host, Broker port, Topic name, Payload, Qo s, and Timeout. Other fields I set to empty.
As I used an AfterStartup microflow to setup my subscription, I also have a BeforeShutDown microflow to call MQTT unsubscribe for the topics I subscribed to.
Hope this helps.
Please find below the error that I am getting in the console. Also, I will upload the settings that I doing with attributes.