What protocols does Azure IoT Hub support? — MQTT, AMQP, HTTPS support

Dhruvesh Sheladiya 0 Reputation points Microsoft Employee
2026-05-14T18:22:28.25+00:00

Description

I am trying to understand the communication protocols supported by Azure IoT Hub for device-to-cloud and cloud-to-device messaging, and how each protocol behaves in different scenarios such as scalability, latency, and network constraints.


Environment Details

Azure Service: Azure IoT Hub

Device Connectivity: IoT devices sending telemetry

Communication Type: Device-to-cloud & Cloud-to-device

Protocols Under Consideration: MQTT, AMQP, HTTPS

Network Environment: Mixed (open + restricted firewall scenarios)


Investigation Details / Observations

IoT Hub supports multiple protocols including:

MQTT

  MQTT over WebSockets
  
     AMQP
     
        AMQP over WebSockets
        
           HTTPS [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           
           MQTT and AMQP allow **bi-directional communication with server push** capability. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           
           HTTPS follows a **request-response model**, requiring devices to poll for messages. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           
           MQTT and HTTPS are typically used for **lightweight or constrained devices**. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           
           AMQP supports **connection multiplexing** (multiple device identities over one connection). [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           

Protocol Characteristics Observed

MQTT

Lightweight protocol optimized for low bandwidth

  Runs on TCP port 8883 (TLS) or 443 via WebSockets [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-mqtt-connect-to-iot-hub)
  
     Suitable for constrained devices and IoT scenarios
     
     **AMQP (Advanced Message Queuing Protocol)**
     
        Enterprise-grade messaging protocol
        
           Supports multiplexing and reliable message exchange [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
           
              Uses port 5671 for secure communication [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
              
              **HTTPS**
              
                 Widely supported across all platforms
                 
                    Uses request-response model (polling for messages) [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                    
                       Typically used when other protocols are not feasible
                       

Steps Followed / Troubleshooting Done

Reviewed IoT Hub documentation for supported protocols

Analyzed protocol behavior for device-to-cloud communication

Checked protocol compatibility with different network/firewall setups

Compared MQTT vs AMQP vs HTTPS capabilities

Observed differences in latency, efficiency, and connection patterns


Mitigation / Considerations Explored

Evaluated using MQTT over WebSockets (port 443) in restricted networks

Considered AMQP for gateway or multi-device scenarios

Assessed HTTPS as fallback when devices cannot support other protocols

Checked impact of polling (HTTPS) vs push-based messaging (MQTT/AMQP)


Challenges / Confusions

When to prefer MQTT vs AMQP for production-grade solutions

Trade-offs between lightweight vs feature-rich protocols

Impact of protocol choice on latency and scalability

Best protocol for firewall-restricted enterprise environments


Ask / Clarification Needed

Which protocol is recommended for high-scale IoT deployments?

  • How does protocol choice impact performance and cost?

What are best practices for selecting protocol based on device type?

Description

I am trying to understand the communication protocols supported by Azure IoT Hub for device-to-cloud and cloud-to-device messaging, and how each protocol behaves in different scenarios such as scalability, latency, and network constraints.

Environment Details

Azure Service: Azure IoT Hub

  Device Connectivity: IoT devices sending telemetry
  
     Communication Type: Device-to-cloud & Cloud-to-device
     
        Protocols Under Consideration: MQTT, AMQP, HTTPS
        
           Network Environment: Mixed (open + restricted firewall scenarios)
           
           ### **Investigation Details / Observations**

              IoT Hub supports multiple protocols including:
              
                    MQTT
                    
                          MQTT over WebSockets
                          
                                AMQP
                                
                                      AMQP over WebSockets
                                      
                                            HTTPS [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                            
                                               MQTT and AMQP allow **bi-directional communication with server push** capability. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                               
                                                  HTTPS follows a **request-response model**, requiring devices to poll for messages. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                  
                                                     MQTT and HTTPS are typically used for **lightweight or constrained devices**. [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                     
                                                        AMQP supports **connection multiplexing** (multiple device identities over one connection). [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                        
                                                        ### **Protocol Characteristics Observed**

                                                           **MQTT**
                                                           
                                                                 Lightweight protocol optimized for low bandwidth
                                                                 
                                                                       Runs on TCP port 8883 (TLS) or 443 via WebSockets [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-mqtt-connect-to-iot-hub)
                                                                       
                                                                             Suitable for constrained devices and IoT scenarios
                                                                             
                                                                                **AMQP (Advanced Message Queuing Protocol)**
                                                                                
                                                                                      Enterprise-grade messaging protocol
                                                                                      
                                                                                            Supports multiplexing and reliable message exchange [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                                                            
                                                                                                  Uses port 5671 for secure communication [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                                                                  
                                                                                                     **HTTPS**
                                                                                                     
                                                                                                           Widely supported across all platforms
                                                                                                           
                                                                                                                 Uses request-response model (polling for messages) [[learn.microsoft.com]](https://learn.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-protocols)
                                                                                                                 
                                                                                                                       Typically used when other protocols are not feasible
                                                                                                                       
                                                                                                                       ### **Steps Followed / Troubleshooting Done**

                                                                                                                          Reviewed IoT Hub documentation for supported protocols
                                                                                                                          
                                                                                                                             Analyzed protocol behavior for device-to-cloud communication
                                                                                                                             
                                                                                                                                Checked protocol compatibility with different network/firewall setups
                                                                                                                                
                                                                                                                                   Compared MQTT vs AMQP vs HTTPS capabilities
                                                                                                                                   
                                                                                                                                      Observed differences in latency, efficiency, and connection patterns
                                                                                                                                      
                                                                                                                                      ### **Mitigation / Considerations Explored**

                                                                                                                                         Evaluated using **MQTT over WebSockets (port 443)** in restricted networks
                                                                                                                                         
                                                                                                                                            Considered AMQP for gateway or multi-device scenarios
                                                                                                                                            
                                                                                                                                               Assessed HTTPS as fallback when devices cannot support other protocols
                                                                                                                                               
                                                                                                                                                  Checked impact of polling (HTTPS) vs push-based messaging (MQTT/AMQP)
                                                                                                                                                  
                                                                                                                                                  ### **Challenges / Confusions**

                                                                                                                                                     When to prefer MQTT vs AMQP for production-grade solutions
                                                                                                                                                     
                                                                                                                                                        Trade-offs between lightweight vs feature-rich protocols
                                                                                                                                                        
                                                                                                                                                           Impact of protocol choice on latency and scalability
                                                                                                                                                           
                                                                                                                                                              Best protocol for firewall-restricted enterprise environments
                                                                                                                                                              
                                                                                                                                                              ### **Ask / Clarification Needed**

                                                                                                                                                                 Which protocol is recommended for high-scale IoT deployments?
                                                                                                                                                                 
                                                                                                                                                                    How does protocol choice impact performance and cost?
                                                                                                                                                                    
                                                                                                                                                                       What are best practices for selecting protocol based on device type?
                                                                                                                                                                       
Azure IoT Hub
Azure IoT Hub

An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.


2 answers

Sort by: Most helpful
  1. Karnam Venkata Rajeswari 4,925 Reputation points Microsoft External Staff Moderator
    2026-05-14T18:43:30.6966667+00:00

    Hello @Dhruvesh Sheladiya ,

    Welcome to Microsoft Q&A .Thank you for reaching out to us.

    Azure IoT Hub supports multiple device-side protocols for device-to-cloud (D2C) and cloud-to-device (C2D) communication. Selecting the appropriate protocol depends on device capability, network constraints, scalability needs, and required communication patterns.

    1. Supported Device Protocols
      1. Azure IoT Hub supports MQTT (including WebSockets), AMQP (including WebSockets), and HTTPS for device communication
      2. All communication is secured using TLS (minimum TLS 1.2), with authentication provided through SAS tokens or X.509 certificates. It is also important to note that IoT Hub has a bounded MQTT implementation and does not act as a full MQTT broker.
    2. Protocol Behavior and Selection
      1. MQTT is generally the preferred default for most IoT devices. It is lightweight, efficient, and maintains a persistent connection per device, enabling low-overhead telemetry and real-time cloud-to-device communication through server push. However, each device requires its own connection, as MQTT does not support multiplexing
      2. AMQP is better suited for enterprise and gateway-based scenarios. Like MQTT, it uses persistent connections and supports push-based communication, but its key advantage is the ability to multiplex multiple device identities over a single connection, making it highly efficient when many downstream devices communicate via a gateway.
      3. HTTPS follows a stateless request-response model and does not support server push. Instead, devices must poll IoT Hub to receive cloud-to-device messages. This introduces additional latency and overhead, and to avoid throttling, polling frequency should typically be limited to approximately every 25 minutes or more.
    3. Latency, Scalability, and Communication Behavior
      • MQTT and AMQP support push-based cloud-to-device communication, allowing IoT Hub to deliver messages immediately, which results in low latency and near real-time interaction. In contrast, HTTPS relies on polling, meaning message delivery depends on the device’s polling interval and inherently introduces delay.
      • From a scalability perspective, MQTT works efficiently for large fleets of independently connected devices, offering simplicity and low overhead. AMQP is more suitable for gateway architectures where multiple devices are aggregated through fewer connections, improving connection efficiency. HTTPS, due to repeated polling and higher per-request overhead, is less efficient for high-scale or high-frequency communication scenarios.
    4. Performance and Efficiency Considerations
      1. MQTT and AMQP use compact binary messaging, which reduces bandwidth consumption and supports efficient, high-frequency telemetry. HTTPS, being stateless, introduces more overhead due to repeated request handling and is therefore less efficient for continuous communication.
      2. Cost is not directly determined by the protocol itself but is influenced by message volume and usage patterns, with inefficient communication (such as excessive polling) potentially increasing operational overhead.
    5. Firewall and Network Constraints
      1. In restricted network environments, the protocol choice is often driven by what outbound traffic is allowed.
      2. If only port 443 is open, MQTT or AMQP over WebSockets are preferred
      3. HTTPS should be used only when WebSockets are not supported
      4. This approach ensures compatibility with enterprise firewalls while still maintaining efficient communication where possible.

    Best Practice Recommendations

    1. In most deployments, MQTT is the default choice due to its lightweight nature and support for real-time communication. AMQP is preferred for gateway or enterprise scenarios where connection multiplexing and structured messaging are required. HTTPS is typically reserved for devices with limited capability or environments where other protocols cannot be used.
    2. Devices with constrained resources benefit most from MQTT, while gateway or edge systems managing multiple downstream devices benefit from AMQP’s ability to efficiently handle multiple identities over fewer connections

    Please check if the troubleshooting steps help-

    • When diagnosing connectivity issues, it is important to verify that required outbound ports are open and that TLS 1.2 or higher is enabled. Authentication mechanisms such as SAS tokens or X.509 certificates should also be validated.
    • For delayed cloud-to-device communication, check whether HTTPS polling is being used. Switching to MQTT or AMQP can significantly improve responsiveness due to push-based delivery.
    • In restricted environments, using WebSocket-based communication on port 443 usually resolves connectivity issues, provided that proxies and firewalls support long-lived connections. Performance issues can often be mitigated by avoiding frequent reconnect attempts and ensuring that SDK retry and keep-alive configurations are correctly applied.

    The following references might be helpful , please check them out

    Please let us know if the response was helpful

    Thank you

    Was this answer helpful?

    0 comments No comments

  2. AI answer

    2026-05-14T18:23:06.81+00:00

    Azure IoT Hub supports the following device-side protocols for device-to-cloud (D2C) and cloud-to-device (C2D) communication:

    • MQTT
    • MQTT over WebSockets
    • AMQP
    • AMQP over WebSockets
    • HTTPS

    All device communication must be secured with TLS. For MQTT, IoT Hub supports MQTT v3.1.1 over port 8883 and MQTT v3.1.1 over WebSockets on port 443. Insecure MQTT on port 1883 is not supported.

    Port and network behavior

    Required outbound ports per protocol:

    • MQTT: 8883
    • MQTT over WebSockets: 443
    • AMQP: 5671
    • AMQP over WebSockets: 443
    • HTTPS: 443

    For restricted enterprise networks that only allow HTTPS (port 443), use:

    • MQTT over WebSockets (443), or
    • AMQP over WebSockets (443), or
    • HTTPS (443)

    Protocol characteristics and when to use them

    MQTT / MQTT over WebSockets

    • Binary, lightweight protocol with small library footprint.
    • Recommended for:
      • Constrained/low-resource devices (for example, < 1 MB RAM).
      • Devices that need low-latency C2D delivery (server push).
      • Networks where port 8883 is open, or use MQTT over WebSockets on 443 when only HTTPS is allowed.
    • Does not support multiplexing multiple device identities over a single TLS connection; each device uses its own TLS connection and credentials.
    • Good fit for high-scale fleets of simple devices where each device maintains its own connection.

    AMQP / AMQP over WebSockets

    • Binary, enterprise-grade messaging protocol.
    • Recommended for:
      • Field and cloud gateways that must multiplex many downstream devices over a smaller number of upstream connections.
      • Scenarios that benefit from efficient connection sharing and richer messaging patterns.
    • Supports multiple device identities over one connection (connection multiplexing), which is important for scalable gateway architectures.
    • Use AMQP over WebSockets on port 443 when ports like 5671 are blocked.

    HTTPS

    • Text-based, request/response protocol.
    • Recommended for:
      • Devices that cannot support MQTT or AMQP libraries.
      • Rarely connected devices or scenarios where long-lived connections are not feasible.
    • C2D behavior:
      • No efficient server push; devices must poll IoT Hub for messages.
      • Each device should poll no more than once every 25 minutes in production; more frequent polling can cause throttling.
    • Typically higher overhead and latency for C2D compared to MQTT/AMQP.

    Latency, scalability, and cost implications

    • Latency:
      • MQTT and AMQP support server push for C2D, enabling immediate delivery and lower latency.
      • HTTPS relies on polling; C2D latency is at least the polling interval and is less efficient.
    • Scalability and connection patterns:
      • Large fleets of independent devices: MQTT or AMQP are preferred for always-connected, push-based messaging.
      • Gateway scenarios (many downstream devices via one or few upstream connections): AMQP is preferred because it supports multiplexing multiple device identities per connection.
      • HTTPS is less efficient at scale for C2D due to polling and higher protocol overhead.
    • Cost-related considerations (from documented behavior):
      • MQTT and AMQP use binary, compact payloads, reducing bandwidth compared to HTTPS.
      • HTTPS polling more frequently than recommended can lead to throttling and unnecessary traffic.

    Best-practice recommendations

    For high-scale IoT deployments:

    • Use MQTT (or MQTT over WebSockets) for:
      • Large numbers of constrained devices.
      • Low-latency, bi-directional communication where each device maintains its own connection.
    • Use AMQP (or AMQP over WebSockets) for:
      • Field/cloud gateways and scenarios that need connection multiplexing.
      • Enterprise environments where a gateway aggregates many devices.
    • Use HTTPS only when:
      • Devices cannot support MQTT or AMQP.
      • Devices are rarely connected and can tolerate higher latency and polling-based C2D.

    For firewall-restricted enterprise environments:

    • Prefer MQTT over WebSockets or AMQP over WebSockets on port 443.
    • Fall back to HTTPS on port 443 only when WebSocket-based MQTT/AMQP is not possible.

    For device-type–based selection:

    • Low-resource, intermittently connected, or simple devices: MQTT or HTTPS (if MQTT/AMQP not available).
    • Gateway devices or powerful edge devices aggregating many sensors: AMQP.
    • Devices behind strict corporate firewalls: MQTT over WebSockets or AMQP over WebSockets on 443.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.