Skip to content

Broadcasting a message to a specific group doesn’t work correctly with SignalR. #2234

@haekalarif

Description

@haekalarif

I’m having an issue when trying to broadcast messages to a specific group using Azure SignalR Service with Azure Functions.
The message is sent to all users connected to the Hub, even though I’ve already specified the group name in the broadcast.

Actual Scenario

  • Room 1: User A and User B
  • Room 2: User C and User D

When User A sends a message, User B, C, and D all receive it.

Expected Behavior

When User A sends a message, only users in Room 1 (in this case, User B) should receive it.

Steps to Reproduce

  1. Create a SignalR hub and configure group join.
  2. Broadcast a message using the SignalR output binding with a group name.
  3. Observe that all connected users receive the message instead of just those in the target group.

References

The implementation follows examples from the official Microsoft documentation:

Azure Functions SignalR Service Overview

SignalR Service Trigger Binding

SignalR Service Input Binding

SignalR Service Output Binding

Additional Info
Here is a simplified example of the application I built that reproduces the issue:

function-v4.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions