# HiveMQ Edge to Azure IoT Hub: UNSUPPORTED\_PROTOCOL\_VERSION

**URL:** <https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857>\
**Category:** Uncategorized\
**Created:** [May 2, 2024, 1:50pm UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857 "2024-05-02T13:50:27Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![simeon](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@simeon](https://community.hivemq.com/u/simeon)\
**Post date:** [May 2, 2024, 1:50pm UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857/1 "2024-05-02T13:50:27Z")

</div>

Hi HiveMQ Community!

I like the concept of the Hive MQ Edge, but i encounter an issue connecting it to Azure IoT Hub. I proceeded as described here for the settings of the Bridge: [using-the-mqtt-protocol-directly-as-a-device](https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-connect-to-iot-hub#using-the-mqtt-protocol-directly-as-a-device). I enabled TLS but left the settings blank.

I get the following message in the event log of the edge:

`com.hivemq.client.mqtt.mqtt5.exceptions.Mqtt5ConnAckException: CONNECT failed as CONNACK contained an Error Code: UNSUPPORTED_PROTOCOL_VERSION.`

Is this because Azure only supports MQTT 3 ? What can i do to connect it?

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [May 2, 2024, 2:20pm UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857/2 "2024-05-02T14:20:03Z")

</div>

Hi Simeon,

Welcome to the community! It seems you’re encountering an issue with connecting HiveMQ Edge to Azure IoT Hub, specifically receiving a `UNSUPPORTED_PROTOCOL_VERSION` error. Let’s troubleshoot this.

Before diving into solutions, could you confirm if you’re experiencing this problem solely with HiveMQ Edge? Have you successfully connected any other MQTT clients like [MQTT.fx](https://www.softblade.de/download/) or [MQTT-Explorer](https://mqtt-explorer.com/) or [Mosquitto](https://mosquitto.org/man/mosquitto_pub-1.html) to the Azure IoT Hub without encountering similar issues?

Additionally, it might be helpful to verify if MQTT-CLI client ([Home - MQTT CLI](https://hivemq.github.io/mqtt-cli/)) can establish a connection with your Azure IoT Hub or if it encounters the same problem. This would help narrow down whether the issue lies with HiveMQ Edge configuration or if it’s related to Azure IoT Hub’s compatibility with MQTT versions.

Looking forward to your response!  
Warm regards  
Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![simeon](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@simeon](https://community.hivemq.com/u/simeon)\
**Post date:** [May 3, 2024, 12:19pm UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857/3 "2024-05-03T12:19:26Z")

</div>

Hi Daria,

thank you for your response! I managed to connect and publish messages to the Azure IoT Hub via MQTT Explorer and with the MQTT CLI.

Thank you for the hint to use the CLI, with that it was easy to see that it really depends on the MQTT Version. With -V 3 i can create the connection and then publish successfully, with -V 5 i get the `UNSUPPORTED_PROTOCOL_VERSION` response.

In my research i fond that only a preview version of Azure IoT Hub supports MQTT 5 ([Azure IoT Hub MQTT 5 support (preview) - Azure IoT | Microsoft Learn](https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-5-preview)) and it has quite a view limitations. I’m not jet sure if i can use it.

Is there an option to set the MQTT Bridge on HiveMQ Edge to V 3 to be able to use the standard Azure IoT Hub? Or is there another way around this issue?

Kind regards,  
Simeon

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [May 3, 2024, 2:19pm UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857/4 "2024-05-03T14:19:24Z")

</div>

Hi @simeon,

Thank you for delving deeper into this matter! After reviewing the [bridge implementation](https://github.com/hivemq/hivemq-edge/blob/master/hivemq-edge/src/main/java/com/hivemq/bridge/mqtt/BridgeMqttClient.java) in hivemq-edge, it appears there isn’t an option to set the Bridge to V3. Should you find this feature beneficial in supporting MQTT v.3-only brokers, I encourage you to share your idea with our developers. Simply visit [https://github.com/hivemq/hivemq-edge/issues](https://github.com/hivemq/hivemq-edge/issues), select **New Issue** , and then proceed with **Feature request**. Your input is greatly appreciated!

Best regards,  
Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![simeon](https://avatars.discourse-cdn.com/v4/letter/s/e9a140/32.png) [@simeon](https://community.hivemq.com/u/simeon)\
**Post date:** [May 7, 2024, 6:48am UTC](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857/5 "2024-05-07T06:48:44Z")

</div>

> <https://github.com/hivemq/hivemq-edge/issues/414>
>
> \## Problem or use case
> We have a use case where we need to publish data from de…vices to Azure IoT Hub. There is only this \[limited Version\](https://learn.microsoft.com/en-us/azure/iot/iot-mqtt-5-preview) of IoT Hub that supports MQTT 5. We cannot use this for other reasons.
> 
> See also: \[HiveMQ community thread\](https://community.hivemq.com/t/hivemq-edge-to-azure-iot-hub-unsupported-protocol-version/2857)
> 
> \## Preferred solution or suggestions
> When creating an MQTT Bridge on the Hive MQ Edge, have the possibility to select the MQTT Version.
