Skip to content

Commit 60cb523

Browse files
committed
more edits
1 parent 57518b7 commit 60cb523

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

articles/azure-web-pubsub/reference-json-reliable-webpubsub-subprotocol.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,29 @@ ms.topic: conceptual
88
ms.date: 01/04/2023
99
---
1010

11-
# Azure Web PubSub supported Reliable JSON WebSocket subprotocol
12-
13-
This document describes the subprotocol `json.reliable.webpubsub.azure.v1`.
11+
# Azure Web PubSub supported Reliable JSON WebSocket subprotocol
1412

15-
When the client is using this subprotocol, both outgoing data frame and incoming data frame are expected to be **JSON** payloads.
13+
The JSON WebSocket subprotocol, `json.reliable.webpubsub.azure.v1`, enables the highly reliable exchange of publish/subscribe messages directly between clients even under network issues.
14+
15+
This document describes the subprotocol json.reliable.webpubsub.azure.v1.
1616

1717
> [!NOTE]
1818
> Reliable protocols are still in preview. Some changes are expected in future.
1919
2020
## Overview
2121

22-
Subprotocol `json.reliable.webpubsub.azure.v1` empowers the client to have a high reliable message delivery experience under network issues and do a publish-subscribe (PubSub) directly instead of doing a round trip to the upstream server. The WebSocket connection with the `json.reliable.webpubsub.azure.v1` subprotocol is called a Reliable PubSub WebSocket client.
22+
When Websocket client connections drop due to intermittent network issues, messages can be lost. In a pubsub system, publishers are decoupled from subscribers and may not detect a subscribers' dropped connection or message loss. To overcome intermittent network issues and maintain reliable message delivery, you can use the Azure WebPubSub `json.reliable.webpubsub.azure.v1` subprotocol to create a *Reliable PubSub WebSocket client*. A *Reliable PubSub WebSocket client* can reconnect a dropped connection.
23+
24+
For example, in JavaScript, you can create a *Reliable PubSub WebSocket client* with the following code:
2325

24-
For example, in JS, a Reliable PubSub WebSocket client can be created using:
2526
```js
2627
var pubsub = new WebSocket('wss://test.webpubsub.azure.com/client/hubs/hub1', 'json.reliable.webpubsub.azure.v1');
2728
```
2829

2930
When using `json.reliable.webpubsub.azure.v1` subprotocol, see [How to create reliable clients](./howto-develop-reliable-clients.md) to implement reconnection, publisher and subscriber for clients.
3031

32+
When the client is using this subprotocol, both outgoing data frame and incoming data frame are expected to be **JSON** payloads.
33+
3134
[!INCLUDE [reference-permission](includes/reference-permission.md)]
3235

3336
## Requests

0 commit comments

Comments
 (0)