Skip to content

Commit 1cb4943

Browse files
committed
Add demo
1 parent f2fe042 commit 1cb4943

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

articles/azure-web-pubsub/howto-develop-eventlistener.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ Find your Azure Web PubSub service from **Azure portal**. Navigate to **Identity
6060
:::image type="content" source="media/howto-develop-eventlistener/configure-event-hub-listener.png" alt-text="Screenshot of configuring Event Hubs Listener":::
6161

6262

63+
## Test your configuration with live demo
64+
65+
1. Open this [Event Hubs Consumer Client](https://awpseventlistenerdemo.blob.core.windows.net/eventhub-consumer/index.html) web app, input the Event Hubs connection string to connect to an event hub as a consumer. If you get the Event Hubs connection string from an Event Hubs namespace resource instead of an event hub instance, then you need to specify the event hub name. This event hub consumer client is connected with the mode that only reads new events; the events published before aren't seen here. You can change the consumer client connection mode to read all the available events in the production environment.
66+
1. Use this [WebSocket Client](https://awpseventlistenerdemo.blob.core.windows.net/webpubsub-client/websocket-client.html) web app to generate client events. If you've configured to send system event `connected` to that event hub, you should be able to see a printed `connected` event in the Event Hubs consumer client after connecting to Web PubSub service successfully.
67+
:::image type="content" source="media/howto-develop-eventlistener/eventhub-consumer-connected-event.png" alt-text="Screenshot of a printed connected event in the Event Hubs consumer client app":::
68+
If you've configured to send user events to that event hub, you can also generate a user event with the app:
69+
:::image type="content" source="media/howto-develop-eventlistener/web-pubsub-client-specify-event-name.png" alt-text="The area of the WebSocket client app to generate a user event":::
70+
6371
## Next steps
6472

6573
In this article, you learned how event listeners work and how to configure an event listener with an event hub endpoint. To learn the data format sent to Event Hubs, read the following specification.
35 KB
Loading
4.76 KB
Loading

0 commit comments

Comments
 (0)