-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
A-socketArea: SocketsArea: SocketsC-discussionCategory: DiscussionCategory: DiscussionC-featureCategory: FeatureCategory: FeatureP-mediumPriority: MediumPriority: Medium
Description
From sub/socket.rs:
/// Subscribes to the given topic. This will subscribe to all connected publishers.
/// If the topic does not exist on a publisher, this will not return any data.
/// Any publishers that are connected after this call will also be subscribed to.
pub async fn subscribe(&mut self, topic: impl Into<String>) -> Result<(), SubError> {So if a consumer of this library wants to have hybrid setups where it only wants to subscribe to a subset of publishers, it needs to create multiple sub-sockets and potentially merging the streams into one.
As such, we may offer a more specific version of this function:
/// Subscribes to the given topic. This will subscribe only to the provided publisher.
/// If the topic does not exist on a publisher, this will not return any data.
pub async fn subscribe_to_publishers(&mut self, topic: impl Into<String>, publishers: Vec<SocketAddr>) -> Result<(), SubError> {I want to create a discussion first, I'm still on the fence whether we actually need this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-socketArea: SocketsArea: SocketsC-discussionCategory: DiscussionCategory: DiscussionC-featureCategory: FeatureCategory: FeatureP-mediumPriority: MediumPriority: Medium