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

(golang) give a random index for NewSubscriptionLoadBalancer #656

Closed
wants to merge 0 commits into from

Conversation

kingkh1995
Copy link
Contributor

Which Issue(s) This PR Fixes

Fixes #655

Brief Description

If use SimpleConsumer for consumption, due to the invalidation of the TopicRoute in the subTopicRouteDataResultCache, the SubscriptionLoadBalancer will be recreated, because the index is not given a random value (a random value is given in the Java client), the index always starts from 0, If the awaitDuration value is set too large, You may never be able to pull a message from a queue that is lower in order.

How Did You Test This Change?

I'm no Go expert, please help me improve my code if need.

@kingkh1995 kingkh1995 changed the title #655 give a random index for NewSubscriptionLoadBalancer (golang) give a random index for NewSubscriptionLoadBalancer Dec 26, 2023
@kingkh1995 kingkh1995 closed this Dec 26, 2023
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.

[Bug] Use SimpleConsumer there will always be some messages that cannot be pulled
1 participant