[Function("DoSomething")]
[SignalROutput(HubName = "serverless", ConnectionStringSetting ="SignalRConnection")]
public async Task<SignalRMessageAction> DoSomething([ServiceBusTrigger("queue", Connection = "BusConnection")] ServiceBusReceivedMessage message)
{
return new SignalRMessageAction("newMessage")
{
Arguments = new[] { message.Body.ToString() }
};
}
everything is fine while getting message from ServiceBus, trigger is working but when method triggers return method is not broadcasting message. This is the only code block btw. I don’t have any client or something I expect to see connection or message on Azure SignalR Dashboard but there is 0 connection and 0 message. What am I missing?
Additionaly is it normal to see SignalR Trigger Empty on Azure Portal? it’s Linux Azure Function
2
Answers
I couldn't solve it without SignalR client...
What I did is I wrote an very basic SignalR client https://github.com/sercandumansiz/Matchmaking/blob/master/src/TriggerFunction/index.html
But still not sure how to use SignalTrigger without client...
I hope the repository that I shared will help you all the triggers inside TriggerFunction is working you can ask me for details the one I would like to mention is
https://github.com/sercandumansiz/Matchmaking/blob/master/src/TriggerFunction/ServiceBusQueueTrigger.cs
"negotiate" function that I shared above, I hope that project details help you too...
AFAIK, By using Isolated servicebus queue trigger function integrate with SignalR hub some SDK issues will come. If the requirement is sending servicebus queue message to signalR hub use another approach like directly servicebus integrate with signalR hub and send messages.
By using below code will send messages from servicebus message to signalR.
The servicebus message will be sending followed like below:
For any further clarification required Refer this DOC