-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I'm having some confusion regarding the functionality of Broadcast Channels in the Microsoft Orleans framework. It appears that in order to create a ChannelId, a Namespace and Key are required. However, it's not entirely clear what the Key should be used for.
After some debugging, I discovered that the Key of the ChannelId seems to correspond to the Id of the subscriber Grain. However, I am not sure how this would enable a broadcast functionality.
In my demo application, I have instances of the following grains:
- Publisher/0
- Subscriber/0
- Subscriber/1
- Subscriber/2.
The publisher writes its broadcast messages to a Channel with Namespace "myNamespaceAbc." The subscriber grains are set up to receive these messages via the [ImplicitChannelSubscription("myNamespaceAbc")] attribute.
Ideally, this setup should ensure that every instance of the subscriber grain receives all messages from the publisher. However, I have encountered an issue where a new subscriber grain with Id "Subscriber/ABCD" is created and only that grain receives the broadcast message when the Key is set to "ABCD." The other subscriber grains do not receive the message.
I am unsure if I have misunderstood the intended behavior of Broadcast Channels or if there is an issue with my implementation