You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/reference-cloud-events-amqp.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,17 @@ ms.date: 09/30/2022
10
10
11
11
# CloudEvents extension for Azure Web PubSub event listener with AMQP protocol
12
12
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.
14
14
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.
16
18
17
19
## Web PubSub CloudEvents attribute extension
18
20
19
21
<aname="extension"></a>
20
22
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.
22
24
23
25
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.
24
26
@@ -49,7 +51,7 @@ The "\*" following the attribute name indicates the attribute is present only wh
49
51
## Events
50
52
<aname="events"></a>
51
53
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.
53
55
54
56
- System `connect` event: Not supported by event listeners.
55
57
-[System `connected` event](#connected)
@@ -79,7 +81,7 @@ The message body is always empty JSON.
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/reference-cloud-events.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,9 @@ ms.date: 11/08/2021
10
10
11
11
# CloudEvents extension for Azure Web PubSub event handler with HTTP protocol
12
12
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).
14
14
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.
*`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.
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.
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).
151
151
152
152
#### Error response format:
153
153
@@ -434,7 +434,7 @@ UserResponsePayload
434
434
* Status code
435
435
*`204`: Success, with no content.
436
436
*`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.
438
438
* 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:
0 commit comments