Clarification: relationship between SLIM pubsub session topics and publish topic argument #580
-
Questions
Why I’m askingFrom the current surface area it looks like session and topic are tightly tied, so repeating the topic feels like an opportunity for mismatch/bugs. If sessions are multi-topic, it would be helpful to have docs that explain how to:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
Related to this, I see this open PR: #561 that shows multiple sessions being open on the same topic. Does that mean all sessions are privy to all messages on that topic? To achieve true pubsub without invites, could multiple agents act as a "moderator" and join a topic via different sessions and receive all group messages? |
Beta Was this translation helpful? Give feedback.
-
|
The relation between session & topic depends on the exact session configuration. There are two types of sessions: FireAndForget, Streaming. You can read more about these here. Basically FireAndForget can be used mostly for One to one (anycast) communication while Streaming is for group communication. Also these can be used with or without MLS and FireAndForget can be set as sticky, meaning all messages will go the first discovered endpoint in case there are multiple apps subscribed with same channel name. In case you set sticky = true for a FireAndForget session or you enable MLS (enablining MLS will also force the session to be sticky) then the relation between session & topic is 1 -> 1. In this case you can only publish to one topic which is the one you specified when creating a Streaming session or in case of FireAndForget as you don't have to specify the topic name at configuration time, will be first topic you publish to. In case you don't use MLS and sticky session you can publish to different topics using the same session. |
Beta Was this translation helpful? Give feedback.
The relation between session & topic depends on the exact session configuration.
There are two types of sessions: FireAndForget, Streaming. You can read more about these here. Basically FireAndForget can be used mostly for One to one (anycast) communication while Streaming is for group communication. Also these can be used with or without MLS and FireAndForget can be set as sticky, meaning all messages will go the first discovered endpoint in case there are multiple apps subscribed with same channel name.
In case you set sticky = true for a FireAndForget session or you enable MLS (enablining MLS will also force the session to be sticky) then the relation between session & topic is 1 -> 1.…