1

I am trying to add SignalR to our existing system. We have a Function app that works as an API for our mobile clients, and another Function app that works as a back end receiving and processing data from a Service Bus.

We want to send a message to a user using Signal when a message is received on the Service bus for them.

So, when the mobile app is opened it will call the API function app and get a SignalR connection, and set up a handler for "NewMessage".

When backend Function app receives a message from the service bus on a Service Bus Trigger, it will process the message, and send a "NewMessage" to the user using SignalR.

At least that is the plan.

So far, I have the API connecting to SignalR, and the SignalR connection working, I added a temporary test method on the API to send a sample "NewMessage" through SignalR, and this too is working.

However, when I add the Send into the Backend function app, it seems to send OK, no errors are raised, but the message never arrives.

This is all in DotNet 8.

Have I went down a wrong path? Is it possible for two Function Apps to connect to a single SignalR Service?

I have checked all connections, and everything appears to be Ok, no error are throw, the messages appear to go through the Backend function ok, but never arrive on the app.

2
  • Are you running SignalR service in Serverless mode? I haven't tried this scenario myself, but it feels like it should be possible since in Serverless mode you can send messages to connections through their REST API and there is no active connections between SignalR service and Functions. Commented Apr 12, 2024 at 17:44
  • Yes, it's in serverless mode. Commented Apr 12, 2024 at 17:49

1 Answer 1

1

I fixed this - the issue was I had different Hub names between the two function apps. When I renamed them to match, it started working.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.