Subscribing to Messages from a Specific Group in Azure Web PubSub

Shreenivas A 0 Reputation points
2024-06-04T07:39:18.35+00:00

Hello Azure Support Team,

I am using the Azure Web PubSub service and have encountered a question regarding message subscriptions.

Context:

  • I have successfully created an access token with a specified group.
  • My current implementation subscribes to messages from the entire hub, and this is working as expected.

Requirement: I want to adjust my implementation so that I can subscribe to messages only from a specific group within the hub. In essence, I need to receive messages that are broadcasted to a particular group, not from the entire hub.

Details:

  • Hub: "Hub"
  • Group: "Rishi"

Question: How can I configure my subscription to receive messages exclusively from the specified group? Are there any specific changes or configurations required in the access token generation or in the subscription logic to achieve this?

I appreciate your guidance on this matter.

Thank you.

Best regards, Shreenivas A

Azure Web PubSub
Azure Web PubSub
An Azure service that provides real-time messaging for web applications using WebSockets and the publish-subscribe pattern.
70 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ajkuma 24,076 Reputation points Microsoft Employee
    2024-06-04T13:04:36.6533333+00:00

    @Shreenivas A , Thanks for posting this question.

    There is no way to exclude messages from a 'Hub', and it is not supported.
    Alternatively, you may not use "SendToAll" (which broadcast to the hub), always use "SendToGroup"

    If you wish you may share your feedback on Uservoice - All of the feedback, you share in these forums will be monitored and reviewed by the Microsoft engineering teams responsible for building Azure. Additionally, users with a similar request can up-vote your post and add their comments.

    I have also relayed this feedback internally to our product team.


     If the answer helped (pointed, you in the right direction) > please click Accept Answer - it will help users to find the answers quickly.