Skip to content

Commit 0db766c

Browse files
committed
more edits
1 parent 932ea13 commit 0db766c

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,17 @@ This document describes the subprotocol json.reliable.webpubsub.azure.v1.
1717
> [!NOTE]
1818
> Reliable protocols are still in preview. Some changes are expected in the future.
1919
20-
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.
20+
When Websocket client connections drop due to intermittent network issues, messages can be lost. In a pub/sub system, publishers are decoupled from subscribers and may not detect a subscribers' dropped connection or message loss.
2121

22-
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.
22+
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*.
23+
24+
A *Reliable PubSub WebSocket client* can:
25+
26+
* reconnect a dropped connection.
27+
* recover from message loss.
28+
* join a group using [join requests](#join-groups).
29+
* publish messages directly to a group using [publish requests](#publish-messages).
30+
* route messages directly to upstream event handlers using [event requests](#send-custom-events).
2331

2432
For example, you can create a *Reliable PubSub WebSocket client* with the following JavaScript code:
2533

@@ -29,7 +37,7 @@ var pubsub = new WebSocket('wss://test.webpubsub.azure.com/client/hubs/hub1', 'j
2937

3038
See [How to create reliable clients](./howto-develop-reliable-clients.md) to implement reconnection and message reliability for publisher and subscriber clients.
3139

32-
When the client is using this subprotocol, both outgoing and incoming data frames are expected to contain JSON payloads.
40+
When the client is using this subprotocol, both outgoing and incoming data frames must contain JSON payloads.
3341

3442
[!INCLUDE [reference-permission](includes/reference-permission.md)]
3543

@@ -50,15 +58,15 @@ Format:
5058

5159
Reliable PubSub WebSocket client must send a sequence ack message once it receives a message from the service. For more information, see [How to create reliable clients](./howto-develop-reliable-clients.md#subscriber)
5260

53-
* `sequenceId` is a incremental uint64 number from the message received.
61+
* `sequenceId` is an incremental uint64 number from the message received.
5462

5563
## Responses
5664

5765
Messages received by the client can be several types: `ack`, `message`, and `system`. Messages with type `message` have `sequenceId` property. Client must send a [Sequence Ack](#sequence-ack) to the service once it receives a message.
5866

5967
### Ack response
6068

61-
When the request contains `ackId`, the service will return an ack response for this request. The client implementation should handle this ack mechanism, including waiting for the ack response using an `async` `await` operation, and have a timeout handler when the ack response is not received during a certain period.
69+
When the request contains `ackId`, the service will return an ack response for this request. The client implementation should handle this ack mechanism, including waiting for the ack response using an `async` `await` operation, and have a timeout handler when the ack response isn't received during a certain period.
6270

6371
Format:
6472
```json
@@ -182,7 +190,7 @@ Find more details in [Reconnection](./howto-develop-reliable-clients.md#reconnec
182190

183191
#### Disconnected
184192

185-
When the server closes the connection, or when the service declines the client.
193+
The response when the server closes the connection or when the service declines the client connection.
186194

187195
```json
188196
{

0 commit comments

Comments
 (0)