Connection Timeout with HiveMQ Public Broker

Hi everyone,

I’m experiencing a connection timeout issue when trying to connect to the HiveMQ public MQTT broker. Here are the details:

Broker: broker.hivemq.com
Port: 1883
Library: rumqttc (Rust)
Error: Connection timeout

I can successfully connect to other brokers, including:

  • A self-hosted Mosquitto broker
  • The public EMQX broker

This suggests the issue might be specific to my connection with HiveMQ. I’m not seeing any error messages beyond the timeout.

Has anyone encountered similar issues with the HiveMQ public broker? Could there be any specific configuration required for rumqttc when connecting to HiveMQ that differs from other brokers?

Any suggestions for troubleshooting would be greatly appreciated. I’m wondering if this could be related to network constraints, firewall settings, or perhaps something specific to how rumqttc interacts with HiveMQ.

Thanks in advance for your help!

Found the issue it was as stated because of a timeout and my first was that the keep alive value was not big enough, but after trying to connect with moquitto sub to the public broker I noticed that connect packet took some time to be sent and it was maybe due to the initial tcp connection between the client and the broker not yet made, so I have updated the connection timeout on the library and it works perfectly fine.