Azure Service Bus Demo

Azure Service Bus · Azure Functions · SignalR

Queue-triggered Function, live over SignalR

Send a message to a queue; an Azure Function picks it up and pushes it back to this page through a SignalR hub, without the page reloading.

Azure Functions, Azure Service Bus and SignalR icons

1Connect to SignalR

The page asks the SignalR endpoint to negotiate, gets back a connection ID, the transport (WebSockets) and the service URL, then opens the connection.

Connection: connecting…

2Send

Adds a new message to the queue demo-asb-queue-triggers-azure-function. The form posts in the background, because a full page reload would drop the SignalR connection.

3The Azure Function

Triggered by the queue message, it processes it and:

The Function: https://weatherfunctionopenmeteo.azurewebsites.net/api/GetAzureServiceBusMessage

4Messages back from the Function

The SignalR script on this page adds each one as it arrives (anyone else on the page sees them too).