Skip to content

Commit f2fe042

Browse files
committed
update
1 parent 0566063 commit f2fe042

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

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

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,53 +102,59 @@ Message body is what the client sends.
102102
- `content-type`: `application/octet-stream` for binary frame; `application/json` for JSON frame; `text/plain` for text frame; `application/x-protobuf` for Protobuf frame;
103103
- `cloudEvents:type`: `azure.webpubsub.user.<event_name>`
104104

105-
The following cases show how to send events with different data content types and the corresponding AMQP message bodies.
105+
The following cases show how to send events with different data content types and the received AMQP message bodies.
106106

107107
#### Case 1: send event with text data:
108+
108109
```json
109110
{
110111
"type": "event",
111112
"event": "<event_name>",
112-
"dataType" : "text",
113+
"dataType": "text",
113114
"data": "text data"
114115
}
115116
```
116117

117-
Event Hubs message body:
118+
Received AMQP message body:
119+
118120
```
119121
text data
120122
```
121123

122124
#### Case 2: send event with JSON data:
125+
123126
```json
124127
{
125128
"type": "event",
126129
"event": "<event_name>",
127-
"dataType" : "json",
130+
"dataType": "json",
128131
"data": {
129132
"hello": "world"
130-
},
133+
}
131134
}
132135
```
133136

134-
Event Hubs message body:
137+
Received AMQP message body:
138+
135139
```
136140
{
137141
"hello": "world"
138142
}
139143
```
140144

141-
142145
#### Case 3: send event with binary data:
146+
143147
```json
144148
{
145149
"type": "event",
146150
"event": "<event_name>",
147-
"dataType" : "binary",
151+
"dataType": "binary",
148152
"data": "aGVsbG8gd29ybGQ=" // base64 encoded binary
149153
}
150154
```
151-
Event Hubs message body:
155+
156+
Received AMQP message body:
157+
152158
```
153159
<binary data>
154-
```
160+
```

0 commit comments

Comments
 (0)