title | description | author | ms.topic | ms.date | ms.author |
---|---|---|---|---|---|
Azure Functions SignalR Service bindings |
Understand how to use SignalR Service bindings with Azure Functions. |
craigshoemaker |
reference |
02/28/2019 |
cshoe |
This set of articles explains how to authenticate and send real-time messages to clients connected to Azure SignalR Service by using SignalR Service bindings in Azure Functions. Azure Functions supports input and output bindings for SignalR Service.
Action | Type |
---|---|
Handle messages from SignalR Service | Trigger binding |
Return the service endpoint URL and access token | Input binding |
Send SignalR Service messages | Output binding |
Working with the trigger and bindings requires that you reference the appropriate package. The NuGet package is used for .NET class libraries while the extension bundle is used for all other application types.
Language | Add by... | Remarks |
---|---|---|
C# | Installing the NuGet package, version 3.x | |
C# Script, Java, JavaScript, Python, PowerShell | Registering the extension bundle | The Azure Tools extension is recommended to use with Visual Studio Code. |
C# Script (online-only in Azure portal) | Adding a binding | To update existing binding extensions without having to republish your function app, see Update your extensions. |
For details on how to configure and use SignalR Service and Azure Functions together, refer to Azure Functions development and configuration with Azure SignalR Service.
To use the SignalR Service annotations in Java functions, you need to add a dependency to the azure-functions-java-library-signalr artifact (version 1.0 or higher) to your pom.xml file.
<dependency>
<groupId>com.microsoft.azure.functions</groupId>
<artifactId>azure-functions-java-library-signalr</artifactId>
<version>1.0.0</version>
</dependency>
Add the AzureSignalRConnectionString
key to the host.json file that points to the application setting with your connection string. For local development, this value may exist in the local.settings.json file.