Home NewsX MQTT Support in Azure Web PubSub Service

MQTT Support in Azure Web PubSub Service

by info.odysseyx@gmail.com
0 comment 15 views


We are excited to announce the long-requested release of MQTT support for Azure Web PubSub service, now available in preview! This addition makes it easier for developers to connect and communicate with resource-constrained devices by leveraging the lightweight and widely used MQTT protocol for messaging.

What is MQTT?

MQTT (Message Queuing Telemetry Transport) is a lightweight pub/sub messaging protocol specifically designed for low bandwidth, high latency, or unreliable networks. It is an ideal choice for IoT (Internet of Things) devices and other resource-constrained scenarios. Development teams also use the MQTT protocol to build chat apps.

Azure Web PubSub now supports MQTT, so you can connect clients running on the WebSocket protocol or MQTT (over WebSocket) without worrying about scalability. Even better, these clients can cross-communicate with each other even if they use different protocols, making it an ideal architectural solution if your application has a mix of clients.

mqtt_support_in_azure_web_pubsub.jpeg

Key MQTT features of Azure Web PubSub

  1. Compatibility support for MQTT protocol:
    Azure Web PubSub supports MQTT 3.1.1 and 5.0 protocols, allowing any MQTT library with a WebSocket transport to connect directly to the Azure Web PubSub service. This makes it easy to integrate MQTT with existing systems, regardless of programming language or platform.
  2. Cross protocol communication:
    Cross-protocol communication allows MQTT clients to interact with other clients using other web PubSub protocols. This feature expands the possibilities for integrating different systems and devices within a single communication hub. Find more details here
  3. Seamless adoption for existing Web PubSub customers
    Current customers of Azure Web PubSub can adopt MQTT with minimal modifications. The Web PubSub REST API is already equipped to handle MQTT connections, ensuring a smooth transition.
  4. Client-server request/response model
    Azure Web PubSub supports a client-to-server request/response model in addition to the traditional client-to-client Pub/Sub model. You can convert a specific MQTT application message into an HTTP request and send it to a registered webhook. The response is then passed back to the MQTT client as an application message. For more information, see: MQTT Custom Event Handler Protocol.

Supported Features

Azure Web PubSub fully supports MQTT 3.1.1 and 5.0. Features include:

  • Quality of Service (QoS): All levels including “at most once”, “at least once”, and “exactly once” .
  • Message Order Guarantee
  • Persistent Session: If the connection is interrupted, the session is preserved for up to 30 seconds.
  • Will: Ensures that the final message is delivered if the client disconnects unexpectedly.
  • Client Certificate Authentication

Additional features in MQTT 5.0 include:

  • Message expiration interval and session expiration interval
  • Subscription identifier
  • Assigned Client ID
  • Flow Control
  • Disconnected from server

Features not supported in this preview

  • Wildcard Subscription
  • Archived messages
  • Share Subscription

Authentication and Authorization

Azure Web PubSub provides two workflows to authenticate and authorize MQTT clients.

  • JWT based authentication: The MQTT client obtains a JWT token and includes it in a WebSocket request. The Web PubSub service then verifies the token.
  • Upstream Server Authentication: After establishing a WebSocket connection, the MQTT client sends a CONNECT packet. The Web PubSub service calls an API on the upstream server, authenticating the client using a username, password, and TLS certificate.

These workflows can be used independently or in combination, providing flexibility in securing MQTT communications.

Client Life Event Notification

Azure Web PubSub allows you to increase visibility into system activity by registering event handlers to be notified when MQTT client sessions start or end.

REST API support

The Azure Web PubSub REST API now provides specific support for operations for MQTT clients, including:

  • Post a message to a topic, connection, user, or all connections.
  • Manage client permissions and subscriptions.

Get started today!

We are excited to bring MQTT support to Azure Web PubSub. We look forward to seeing how you use this feature in your projects. To try it out quickly, check out: PubSub between MQTT clients – Azure Web PubSub .

Explore new features and take your applications to the next level with the power of MQTT in Azure Web PubSub!





Source link

You may also like

Leave a Comment

Our Company

Welcome to OdysseyX, your one-stop destination for the latest news and opportunities across various domains.

Newsletter

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

Laest News

@2024 – All Right Reserved. Designed and Developed by OdysseyX