-
Notifications
You must be signed in to change notification settings - Fork 5
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 new Subscribe2 method #94
Conversation
title: "MessageApi"; | ||
version: "1.0"; | ||
}; | ||
info: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why my formatter is different from what was used for this file. We should probably add some vscode config to standardize everyone
} | ||
; | ||
} | ||
; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this what the formatter is forcing? This looks terrible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely agree. I tried using a different formatter and that one fails the linter. So, I'm kinda stuck.
🎉 This PR is included in version 3.27.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Our current Subscribe API is limited by the fact that it was built for browser clients. You cannot update subscriptions. To add or remove topics from a subscription, you have to close the existing subscription and create a new one. This is because browsers do not support bidirectional GRPC streaming. With iOS, Android, and Rust native supporting full-fledged GRPC, this limitation doesn't apply.
This PR creates a new SubscribeV2 GRPC service that allows clients to update their subscriptions without disconnecting. These small disconnects are a pain point for apps who rely on streams to get new messages. When using
conversations.streamAllMessages
these disconnects happen every time a new conversation is started, since the stream needs to include the new conversation topics.This change has the added benefit of decreasing load on our nodes, since we wouldn't have to tear down and recreate the subscriptions every time a topic is added.