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 retry for Mirror subscribeTopic #367

Closed
steven-sheehy opened this issue Feb 20, 2020 · 1 comment
Closed

Add retry for Mirror subscribeTopic #367

steven-sheehy opened this issue Feb 20, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@steven-sheehy
Copy link
Contributor

The mirror node has recently added logic to reject subscription to topics that don't exist with NOT_FOUND. The intent is the server shouldn't poll repeatedly for a topic that may never get created and hold open resources, it's more scalable for the client to do so. This is more inline with how get record and receipts function as well within the SDK. It's controlled by a feature flag, but we'd like to roll it out soon if possible as we had a situation in testnet with a large number of subscriptions to invalid topics exhausting resources. We also now return UNAVAILABLE in case the DB is down (and maybe other scenarios in the future).

We'd like the SDK to retry NOT_FOUND and UNAVAILABLE gRPC status codes with some backoff on initial connect to ensure clients have a smooth experience and the server doesn't get overwhelmed with requests. It would also probably be good to retry if the client can't connect at all.

Note the above is only for initial connect as retry UNAVAILABLE or disconnected channel would require more complex state tracking and re-subscribe with an updated ConsensusTopicQuery to reflect that state. We can possibly consider that for a future enhancement.

@mehcode mehcode added the enhancement New feature or request label Apr 7, 2020
@janaakhterov
Copy link
Contributor

Retrying with back-off on gRPC status NOT_FOUND and UNAVAILABLE is now implemented on master.

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

No branches or pull requests

3 participants