---
title: "Real-Time Notifications with MQTT over WebSockets | ConnectMQ"
description: "Push live order status, delivery tracking, alerts and in-app updates to web and mobile apps with MQTT over secure WebSockets — no polling. Start for free."
url: "https://connectmq.com/use-cases/real-time-notifications/"
language: "en"
---

Use case

# Push live updates to every app

Order confirmed, courier two stops away, price alert triggered: your backend publishes the event once, and every browser tab and mobile app that subscribed gets it instantly over MQTT on secure WebSockets — no polling, no socket server of your own.

[Try it free](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

No card required

Used in

-   [Transportation & Logistics](https://connectmq.com/industries/transportation-logistics/)
-   [Retail & E-commerce](https://connectmq.com/industries/retail-ecommerce/)
-   [Financial Services](https://connectmq.com/industries/financial-services/)

Example message

PUBLISH orders/ord-58213/status

```
{"status":"out_for_delivery","eta":"14:35","stops_away":2,"courier":"c-221","ts":"2026-10-22T14:02:51Z"}
```

QoS 1 · TLS 8883 · PUBACK

The problem

## Polling, home-made socket servers and missed updates

Apps that poll an API every few seconds load your backend and still feel slow. A home-made WebSocket service means writing reconnect logic, fan-out and horizontal scaling yourself — and a user who walks from Wi-Fi onto mobile data still misses the one update that mattered.

## How it works

1.  1
    
    ### Your backend publishes events
    
    The order service, dispatch system or alerting job publishes a small JSON event to a topic such as orders/{order id}/status whenever something changes.
    
2.  2
    
    ### Apps subscribe after login
    
    Web apps connect with MQTT.js over secure WebSockets, mobile apps with a native MQTT client, and subscribe to the topics that belong to that user.
    
3.  3
    
    ### The broker fans out
    
    ConnectMQ delivers each event to every subscribed client at once — the customer’s phone, their open browser tab and your support agent’s console.
    
4.  4
    
    ### The UI updates in place
    
    The app moves the order tracker, updates a badge or shows an in-app banner. For apps that are closed, your own push service still sends through APNs and FCM.
    

ConnectMQ

## What it needs from the broker

### Browser-native connections

MQTT over secure WebSockets lets browsers connect directly, to the same broker your backend reaches over MQTT with TLS.

### Each client sees only its topics

Username/password authentication and per-topic ACLs keep a client to its own subtree, such as users/{id}/#, and let only your backend publish to it.

### Current state on (re)connect

Retained messages hand the latest order status to an app the moment it subscribes; persistent sessions with QoS 1 deliver events missed during a short drop.

### The right QoS per event

QoS 0 for frequent courier location ticks where only the newest matters, QoS 1 for status changes and alerts that must arrive.

## What you get

-   Updates appear in the app the moment they happen
-   Less API load from status refreshes and polling
-   No WebSocket server or fan-out layer to build and scale
-   Users see the current state as soon as they reopen the app

Example topics

```
orders/ord-58213/status            (retained)
orders/ord-58213/courier/location
users/u-90417/notifications
users/u-90417/badge                 (retained)
```

## Industries that run this use case

 [![](https://connectmq.com/images/industries/hero/transportation-logistics.webp) Transportation & Logistics](https://connectmq.com/industries/transportation-logistics/) [![](https://connectmq.com/images/industries/hero/retail-ecommerce.webp) Retail & E-commerce](https://connectmq.com/industries/retail-ecommerce/) [![](https://connectmq.com/images/industries/hero/financial-services.webp) Financial Services](https://connectmq.com/industries/financial-services/)

## Related solutions

[

### Connected Products & Smart Hardware

Smart devices you ship to your own customers

Learn more](https://connectmq.com/connected-products/)

## Frequently asked questions

MQTT vs WebSockets for real-time notifications: which should I use?

Both — MQTT runs over WebSockets. A plain WebSocket is only a pipe: you still have to build topics, fan-out, reconnect handling and delivery guarantees. MQTT over secure WebSockets adds publish/subscribe, QoS, retained messages and Last Will on top, and ConnectMQ runs the server side.

Can MQTT replace push notifications (FCM/APNs)?

For apps that are open or in the foreground, yes: MQTT delivers updates faster and with richer data. When an app is closed, iOS and Android limit background connections, so keep APNs and FCM for those. A common pattern is to publish once and let a small service forward selected events to push.

How do I use MQTT in a React or browser app?

Use MQTT.js: connect to your ConnectMQ secure WebSocket endpoint, subscribe to the user’s topics and update state on each message. Never ship a credential with broad permissions in front-end code — give browser clients credentials whose ACL only allows reading their own topics.

## Build it on ConnectMQ

Start on the Free plan — no card required — connect your first devices today and upgrade when you go live.

[Get started](https://app.connectmq.com/signup) [See pricing](https://connectmq.com/pricing/)

## More use cases

-   [Predictive Maintenance](https://connectmq.com/use-cases/predictive-maintenance/)
-   [Asset Performance Tracking](https://connectmq.com/use-cases/asset-performance-tracking/)
-   [Industrial Agentic AI Operations](https://connectmq.com/use-cases/industrial-agentic-ai/)
-   [Energy Management](https://connectmq.com/use-cases/energy-management/)
-   [Connected Vehicles](https://connectmq.com/use-cases/connected-vehicles/)
-   [EV Charging Management](https://connectmq.com/use-cases/ev-charging-management/)
-   [Fleet Management](https://connectmq.com/use-cases/fleet-management/)
-   [Remote Asset Monitoring](https://connectmq.com/use-cases/remote-asset-monitoring/)
-   [Tank Level Monitoring](https://connectmq.com/use-cases/tank-level-monitoring/)
-   [Smart Metering](https://connectmq.com/use-cases/smart-metering/)
-   [Solar & Wind Farm Monitoring](https://connectmq.com/use-cases/solar-wind-farm-monitoring/)
-   [Cleanroom & GMP Environmental Monitoring](https://connectmq.com/use-cases/cleanroom-environmental-monitoring/)
-   [Cold Chain Monitoring](https://connectmq.com/use-cases/cold-chain-monitoring/)
-   [Remote Patient Monitoring](https://connectmq.com/use-cases/remote-patient-monitoring/)
-   [Hospital Equipment Monitoring & Tracking](https://connectmq.com/use-cases/medical-equipment-tracking/)
-   [Smart Store Operations](https://connectmq.com/use-cases/smart-store-operations/)
-   [ATM & POS Terminal Monitoring](https://connectmq.com/use-cases/atm-pos-terminal-monitoring/)
-   [Telecom Network Equipment Monitoring](https://connectmq.com/use-cases/network-equipment-monitoring/)
-   [IoT Platform for Operators](https://connectmq.com/use-cases/iot-platform-for-operators/)
-   [Real-Time Market Data](https://connectmq.com/use-cases/real-time-market-data/)
-   [Agricultural Drones](https://connectmq.com/use-cases/agricultural-drones/)
-   [Greenhouse IoT Sensors](https://connectmq.com/use-cases/greenhouse-iot-sensors/)
-   [Data Center Monitoring](https://connectmq.com/data-centers/)
-   [Smart Irrigation](https://connectmq.com/smart-agriculture/)

## Articles

[All articles](https://connectmq.com/blog/)

Managed MQTT Cloud

### [How to Choose an IoT MQTT Broker: 12 Criteria and the Questions to Ask Your Vendor](https://connectmq.com/blog/how-to-choose-an-iot-mqtt-broker/)

A practical 12-point checklist for choosing an IoT MQTT broker, a table of questions to ask every vendor, and a five-minute hands-on test you can run against broker.connectmq.com.

September 21, 20269 min read

MQTT Fundamentals

### [MQTT QoS Levels Explained: QoS 0, 1 and 2 with Packet Flows and Examples](https://connectmq.com/blog/mqtt-qos-levels-explained/)

A practical guide to MQTT QoS: how QoS 0, 1 and 2 work on the wire, why the delivered QoS can be lower than you asked for, how sessions queue messages and which level to choose for each use case.

August 20, 20269 min read

MQTT Security

### [MQTT Security Best Practices: A 12-Point Checklist for IoT Teams](https://connectmq.com/blog/mqtt-security-best-practices/)

A hands-on MQTT security checklist covering TLS, credentials, client IDs, topic design, payload validation, rate limits and certificate checks, plus how ConnectMQ handles each point.

September 28, 202611 min read
