I'm building a chatbot application using Azure SignalR Service and Azure Functions with the .NET 8 isolated worker model. I'm trying to use the SignalRTrigger binding to receive messages from clients in Serverless mode. Here's what I have so far: My Setup: Azure SignalR Service is set to Serverless mode.
Function App is running on .NET 8 Isolated Worker model.
I have configured the negotiate and sendMessage functions:
[Function("sendMessage")]
[SignalROutput(HubName = "orchestratorhub", ConnectionStringSetting = "SignalR:ConnectionString")]
public async Task SendMessage(
[SignalRTrigger("orchestratorhub", "messages", "sendMessage", ConnectionStringSetting = "SignalR:ConnectionString")] string message,
SignalRInvocationContext context)
{
// message handling logic
}
[Function("negotiate")]
public HttpResponseData Negotiate(
[HttpTrigger(AuthorizationLevel.Anonymous, "post", "get")] HttpRequestData req,
[SignalRConnectionInfoInput(HubName = "orchestratorhub", ConnectionStringSetting = "SignalR:ConnectionString")] SignalRConnectionInfo connectionInfo)
{
var response = req.CreateResponse(HttpStatusCode.OK);
response.WriteAsJsonAsync(connectionInfo);
return response;
}
Summary: I’m using SignalRTrigger in a .NET 8 Isolated Azure Function App. The client successfully connects and receives the negotiate token. However, when invoking connection.send("sendMessage", payload), the Azure Function is never triggered. Application Insights shows no execution of the function, and the client times out.
What I See in Logs:
bash
Copy
Stopped the listener 'Microsoft.Azure.WebJobs.Extensions.SignalRService.NullListener' for function 'sendMessage'
This suggests the binding is not active.
Environment:
Azure SignalR is running in Serverless mode
Using latest Microsoft.Azure.Functions.Worker.Extensions.SignalRService NuGet package (v1.2.0)
.NET 8 Isolated Process Function App
Question:
Does this happen because SignalRTrigger Is not supported for .NET 8 Isolated Azure Functions in combination with Azure SignalR Serverless mode?
If so, is the recommended solution to use HttpTrigger with Upstream configuration instead?
I would appreciate official guidance or confirmation on this matter.
- hat I Have Implemented So Far:
SignalR Setup (Serverless Mode):
Configured Azure SignalR in *Serverless* mode.
Added correct `ConnectionString` in Azure Function settings and `host.json`.
**Azure Functions (Isolated .NET 8):**
Created `sendMessage` function using `SignalRTrigger`.
Added `SendMessageHandler` with `SignalROutput` for pushing responses.
Created `negotiate` function to issue SignalR connection info.
Verified `negotiate` works and client receives URL & token.
**Client-Side Integration (JavaScript):**
Connected to SignalR hub using `@microsoft/signalr`.
Used `connection.send("sendMessage", payload)` to invoke the function.
Handled `ReceiveMessage` and `ReceiveConnectionId` events.
**Shared SignalR Message Sender Class:**
Centralized message sending logic using `IServiceHubContext`.
Handles `BroadcastMessageAsync`, `SendMessageToUserAsync`, `SendToGroupAsync`, etc.
- Current Status:
Negotiate works.
- **SignalRTrigger after `connection.send(...)`**. NullTrigger attached screenshot
**No logs or function invocations observed**, though listener startup logs are present.
**P.S: My azure function code is deployed and UI I am running locally.**
Added `SendMessageHandler` with `SignalROutput` for pushing responses.
Created `negotiate` function to issue SignalR connection info.
Verified `negotiate` works and client receives URL & token.
1. **Client-Side Integration (JavaScript):**
- Connected to SignalR hub using `@microsoft/signalr`.
Used `connection.send("sendMessage", payload)` to invoke the function.
Handled `ReceiveMessage` and `ReceiveConnectionId` events.
**Shared SignalR Message Sender Class:**
Centralized message sending logic using `IServiceHubContext`.
sql
Handles `BroadcastMessageAsync`, `SendMessageToUserAsync`, `SendToGroupAsync`, etc.
1. **Current Status:**
- **Negotiate works.**
- **SignalRTrigger function returning NullListner.(attached Image)**