hi anand! thanks for posting this detailed question ))
yes, there's a known limitation here. the signalrtrigger binding currently doesn't work with azure signalr in serverless mode when using .net 8 isolated functions. that null listener message u're seeing? it's basically telling u the trigger can't activate properly )
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-signalr-service-trigger?tabs=in-process&pivots=programming-language-csharp. the isolated worker model support is still catching up with some bindings.
solution time! u have two good options
- switch to http triggers with upstream settings (this is what microsoft recommends for serverless mode anyway)https://docs.microsoft.com/en-us/azure/azure-signalr/concept-upstream. u'll need to configure the azure signalr service to call your function when messages arrive.
if u really want to keep using signalrtrigger, u'll need to switch from serverless to default mode. but this means managing signalr units yourself, which might not be what u want.
for your current setup, option 1 is probably the way to go. here's a quick example of how the http trigger version would look
[Function("sendMessage")] public async Task<HttpResponseData> SendMessage( [HttpTrigger(AuthorizationLevel.Anonymous, "post")] HttpRequestData req) { // parse message from request // your handling logic here return req.CreateResponse(HttpStatusCode.OK); }
then configure upstream in your signalr service to point to this endpoint. worth noting this approach works consistently across all function versions ))
make sure your connection string is properly set in both local.settings.json and azure portal. sometimes that sneaky little semicolon gets missed and causes silent failures ))
when working with serverless architectures, http triggers often give u more flexibility than specialized bindings. less magic, more control!
if u decide to stick with serverless mode, double check that your function app has 'azure signalr service send to upstream' permission. its easy to miss but crucial for the whole thing to work.
here's the permissions doc just in case https://docs.microsoft.com/en-us/azure/azure-signalr/signalr-concept-azure-functions
hope this helps get your chatbot back on track
Best regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer