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
You'll create a client that uses the Azure Web PubSub SDK to publish a message to all connected clients.
184
+
## 4. Publish messages using service SDK
166
185
167
-
### Set up the project to publish messages
186
+
You'll create a client that uses the Azure Web PubSub SDK to publish a message to all connected clients. For this project, you'll need to open another command shell.
168
187
169
-
Start by opening another command shell.
170
188
Select the language for your project. The dependencies for each language are installed in the steps for that language.
171
189
172
190
# [C#](#tab/csharp)
@@ -334,8 +352,7 @@ Select the language for your project. The dependencies for each language are in
334
352
</dependency>
335
353
```
336
354
337
-
1. Use the Azure Web PubSub SDK to publish a message to the service.
338
-
1. Go to the */src/main/java/com/webpubsub/quickstart* directory.
355
+
1. Go to the *src/main/java/com/webpubsub/quickstart* directory.
339
356
1. Replace the contents in the *App.java* file with the following code:
340
357
341
358
```java
@@ -367,9 +384,9 @@ Select the language for your project. The dependencies for each language are in
367
384
368
385
```
369
386
370
-
This code uses the Azure Web PubSub SDK to publish a message to the service. The `service.sendToAll()` call simply sends a message to all connected clients in a hub.
387
+
This code uses the Azure Web PubSub SDK to publish a message to the service. The `service.sendToAll()` call sends a message to all connected clients in a hub.
371
388
372
-
1. Go to the directory containing the *pom.xml* file and compile the project by using the following `mvn` command.
389
+
1. Return t the*webpubsub-quickstart-publisher* directory containing the *pom.xml* file and compile the project by using the following `mvn` command.
373
390
374
391
```console
375
392
mvn compile
@@ -384,7 +401,7 @@ Select the language for your project. The dependencies for each language are in
384
401
1. Run the following `mvn`command to execute the app to publish a message to the service:
Copy file name to clipboardExpand all lines: articles/azure-web-pubsub/tutorial-pub-sub-messages.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ If creating the project on a local machine, you'll need to install the dependenc
61
61
62
62
---
63
63
64
-
## Create an Azure Web PubSub instance
64
+
## 1. Create an Azure Web PubSub instance
65
65
66
66
67
67
### Create a Web PubSub instance
@@ -371,7 +371,7 @@ Clients connect to the Azure Web PubSub service through the standard WebSocket p
371
371
372
372
---
373
373
374
-
## Publish messages using service SDK
374
+
## 2. Publish messages using service SDK
375
375
376
376
Create a publisher using the Azure Web PubSub SDK to publish a message to the connected client. For this project, you'll need to open another command shell.
377
377
@@ -603,7 +603,7 @@ az group delete --name <CloudShellResourceGroup> --yes
603
603
604
604
```
605
605
606
-
>[CAUTION]
606
+
>[!CAUTION]
607
607
> Deleting resource groups will delete all resources, including resources created outside the scope of this tutorial.
0 commit comments