Closed KeNaCo closed 1 year ago
So, the problem was after all in the version of the MQTT protocol. ActiveMQ doesn't support MQTT 5. Here is the final working version:
await client.connect(host=config.broker_host, port=config.broker_port, ssl=True, version=MQTTv311)
I'm trying to connect to AmazonMQ (Active MQ) broker. But the connection will close and the whole operation repeats infinitely. We verified the configuration and were able to connect to the broker with paho client.
Log
gmqtt snippet
Paho client snippet
Initially, we thought it was a TLS issue, so we experimented with
ssl=True
and passing context. From the debugging I found that for some reason transport will close at thisif
statement: https://github.com/wialon/gmqtt/blob/master/gmqtt/mqtt/protocol.py#L213Any help or explanation is appreciated.