Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add async pubsub manager. #1393

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

nihohit
Copy link
Contributor

@nihohit nihohit commented Oct 21, 2024

A connection manager for pubsub.

Based over #1392 & #1341

@nihohit nihohit force-pushed the shachar/pubsub-manager branch 3 times, most recently from dd4444d to 7c9deea Compare October 25, 2024 11:22
@nihohit nihohit mentioned this pull request Nov 2, 2024
20 tasks
@nihohit nihohit force-pushed the shachar/pubsub-manager branch 2 times, most recently from 026d6fa to 7ede7f9 Compare December 4, 2024 07:26
Copy link
Contributor

@altanozlu altanozlu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just looked through, I will have detailed view & testing this weekend. Looks clean and documented :)


/// The configuration for reconnect mechanism and request timing for the [PubSubManager]
#[derive(Clone, Debug)]
pub struct PubsubManagerConfig {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not directly related to this PR but with PubsubManagerConfig change, there will be 3 different retry configuration in the crate, maybe later on they can merged or share things ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely.

let packed_cmd = cmd.get_packed_command();
async move { sink.send_recv(packed_cmd).await }
});
// TODO - should we handle errors better than just failing? how?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently this PubSubManager only accepts PSUBSCRIBE,SUBSCRIBE and if those channels were able to successfully subscribe before there should be no problem reconnecting again, except some network issues etc. which retrying again feels safer imho.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right. clarified the docs.

@nihohit nihohit force-pushed the shachar/pubsub-manager branch from 7ede7f9 to 4f7a756 Compare December 11, 2024 06:47
@nihohit nihohit force-pushed the shachar/pubsub-manager branch from 4f7a756 to 9ca9a39 Compare December 20, 2024 11:43
@nihohit
Copy link
Contributor Author

nihohit commented Dec 29, 2024

I'm having a hard time stabilizing this, so this probably won't make it into 0.28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants