Skip to content

Commit bee6f25

Browse files
Y-Sindocebundy
andauthored
Apply suggestions from code review
Co-authored-by: Catherine Bundy <[email protected]>
1 parent b0b3866 commit bee6f25

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

articles/azure-web-pubsub/reference-cloud-events-amqp.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ ms.date: 09/30/2022
1010

1111
# CloudEvents extension for Azure Web PubSub event listener with AMQP protocol
1212

13-
Web PubSub Service describes client events as [CloudEvents](https://github.com/cloudevents/spec/tree/v1.0.2). CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems. As for event listener with [Advanced Message Queueing Protocol](http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-overview-v1.0.html)(abbreviated as AMQP), such as Event Hubs, Web PubSub service uses [CloudEvents AMQP protocol binding](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md) to map CloudEvents to AMQP messages.
13+
The Azure Web PubSub Service describes client events as [CloudEvents](https://github.com/cloudevents/spec/tree/v1.0.2). CloudEvents is a specification for describing event data in common formats to provide interoperability across services, platforms and systems.
1414

15-
The data sending from service to server is always in CloudEvents `binary` format.
15+
The Web PubSub service uses [CloudEvents AMQP protocol binding](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md) as an event listener to map CloudEvents to AMQP messages ([Advanced Message Queueing Protocol](http://docs.oasis-open.org/amqp/core/v1.0/amqp-core-overview-v1.0.html)).
16+
17+
The data sent from service to server is always in CloudEvents `binary` format.
1618

1719
## Web PubSub CloudEvents attribute extension
1820

1921
<a name="extension"></a>
2022

21-
This extension defines attributes used by Web PubSub for every event it produces.
23+
This extension defines the attributes used by Web PubSub for each event it produces.
2224

2325
The following table contains attributes mapping to the [standard properties](http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties) section of an AMQP message.
2426

@@ -49,7 +51,7 @@ The "\*" following the attribute name indicates the attribute is present only wh
4951
## Events
5052
<a name="events"></a>
5153

52-
This chapter shows the AMQP message body and the attribute values that depend on the client event type. Attributes whose values don't depend on client event type are omitted here.
54+
This section shows the AMQP message body with the attribute values that depend on a specific client event type. Attribute values that don't depend on a client event type are omitted.
5355

5456
- System `connect` event: Not supported by event listeners.
5557
- [System `connected` event](#connected)
@@ -79,7 +81,7 @@ The message body is always empty JSON.
7981
- `cloudEvents:type`: `azure.webpubsub.sys.disconnected`
8082
- `cloudEvents:eventname`: `disconnected`
8183

82-
The message body contains the reason why the client disconnects.
84+
The message body contains the reason the client disconnected.
8385

8486
```json
8587
{"reason":"{Reason}"}

articles/azure-web-pubsub/reference-cloud-events.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ ms.date: 11/08/2021
1010

1111
# CloudEvents extension for Azure Web PubSub event handler with HTTP protocol
1212

13-
Service delivers client events to the upstream webhook using the [CloudEvents HTTP protocol binding](https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md).
13+
The Web PubSub service delivers client events to the upstream webhook using the [CloudEvents HTTP protocol binding](https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md).
1414

15-
The data sending from service to server is always in CloudEvents `binary` format.
15+
The data sent from the Web PubSub service to the server is always in CloudEvents `binary` format.
1616

1717
- [Webhook Validation](#protection)
1818
- [Web PubSub CloudEvents Attribute Extension](#extension)
@@ -114,7 +114,7 @@ ce-eventName: connect
114114
* Status code:
115115
* `204`: Success, with no content.
116116
* `200`: Success, the content SHOULD be a JSON format, with following properties allowed:
117-
* Header `ce-connectionState`: If this header exists, the connection state of this connection will be updated to the value of the header. Please note that only *blocking* events can update the connection state. The below sample uses base64 encoded JSON string to store complex state for the connection.
117+
* Header `ce-connectionState`: If this header exists, the connection state of this connection will be updated to the value of the header. Please note that only *blocking* events can update the connection state. The below sample uses base64 encoded JSON string to store the complex state for the connection.
118118
*
119119
```HTTP
120120
HTTP/1.1 200 OK
@@ -137,7 +137,7 @@ ce-connectionState: eyJrZXkiOiJhIn0=
137137

138138
* `userId`: `{auth-ed user ID}`
139139

140-
As the service allows anonymous connections, it's the `connect` event's responsibility to tell the service the user ID of the client connection. The Service will read the user ID from the response payload `userId` if it exists. The connection will be dropped if user ID cannot be read from the request claims nor the `connect` event's response payload.
140+
As the service allows anonymous connections, it's the `connect` event's responsibility to tell the service the user ID of the client connection. The service will read the user ID from the response payload `userId` if it exists. The connection will be dropped if the user ID cannot be read from the request claims nor the `connect` event's response payload.
141141

142142
<a name="connect_response_header_group"></a>
143143

@@ -147,7 +147,7 @@ ce-connectionState: eyJrZXkiOiJhIn0=
147147

148148
* `roles`: `{roles the client has}`
149149

150-
The property provides a way for the upstream to authorize the client. Different roles define different initial permissions the client has, it can be useful when the client is a PubSub WebSocket client. Details about the permissions are described in [Client permissions](./concept-client-protocols.md#permissions).
150+
The property provides a way for the upstream Webhook to authorize the client. There are different roles to grant initial permissions for PubSub WebSocket clients. Details about the permissions are described in [Client permissions](./concept-client-protocols.md#permissions).
151151

152152
#### Error response format:
153153

@@ -434,7 +434,7 @@ UserResponsePayload
434434
* Status code
435435
* `204`: Success, with no content.
436436
* `200`: Success, data sending to the PubSub WebSocket client depends on the `Content-Type`;
437-
* Header `ce-connectionState`: If this header exists, the connection state of this connection will be updated to the value of the header. Please note that only *blocking* events can update the connection state. The below sample uses base64 encoded JSON string to store complex state for the connection.
437+
* Header `ce-connectionState`: If this header exists, the connection state of this connection will be updated to the value of the header. Please note that only *blocking* events can update the connection state. The below sample uses base64 encoded JSON string to store the complex state for the connection.
438438
* When Header `Content-Type` is `application/octet-stream`, the service sends `UserResponsePayload` back to the client using `dataType` as `binary` with payload base64 encoded. A sample response:
439439
```json
440440
{

0 commit comments

Comments
 (0)