Closed vedrancek closed 1 month ago
Hello,
I works... the problem was in the too small MQTT packet size... My token has over 900 characters. So I had to only adjust the setBufferSize(). My ignorance in this case...
Best regards.
I am closing this....
Hello,
I am facing a problem connecting to my RabbitMQ with a username and password as a token. RabbitMQ is configured to authenticate with Oauth 2.0. I tested the connection with Mosquitto pub and sub functions. For example:
mosquitto_sub -h RabbitMQ_IP -p 1883 -t test/topic -u "user" -P "eyJhbGciOiJSUzI1NiIsInR5cC token)"
to subscribe and:mosquitto_pub -h RabbitMQ_IP -p 1883 -t test/topic -m "Hello, MQTT" -u "user" -P "eyJhbGciOiJSUzI1NiIsInR5cC token"
to publish a message. And this works.When I want to do the same with the ESP32 with a simple Arduino sketch I get an rc=-1 error.
Arduino sketch:
What am I doing wrong? MQTT 3.1.1 protocol should support OAuth [RFC6749] tokens. Link to the specification
Best regards.