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

[Bug] Use SimpleConsumer there will always be some messages that cannot be pulled #655

Closed
3 tasks done
kingkh1995 opened this issue Dec 26, 2023 · 2 comments
Closed
3 tasks done
Labels
stale Pull request is stale type/bug Something isn't working

Comments

@kingkh1995
Copy link
Contributor

kingkh1995 commented Dec 26, 2023

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Programming Language of the Client

Go

Runtime Platform Environment

Windows/Linux

RocketMQ Version of the Client/Server

2d3cdf7

Run or Compiler Version

No response

Describe the Bug

使用SimpleConsumer进行消费,由于subTopicRouteDataResultCache中TopicRoute的失效,会重新创建SubscriptionLoadBalancer,由于没有给index一个随机值(Java client中给定了一个随机值),导致index总是从0开始,在awaitDuration值设置过大的场景下,可能永远都无法从排序靠后的队列中拉取消息,导致永远存在消息堆积。

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.

Steps to Reproduce

  1. create a cluster with 2 broker in proxy local mode;
  2. create a topic with 8 read-write queue;
  3. send a certain number of messages then stop;
  4. use SimpleConsumer ;

What Did You Expect to See?

使用SimpleConsumer,发送一批消息后,所有消息都能被消费到。

Use SimpleConsumer, after sending a batch of messages, all messages can be consumed.

What Did You See Instead?

使用SimpleConsumer,发送一批消息后,永远都有部分消息无法被拉取。

Use SimpleConsumer, after sending a batch of messages, there will always be some messages that cannot be pulled.

Additional Context

No response

Copy link

This issue is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs.

@github-actions github-actions bot added the stale Pull request is stale label Jan 26, 2024
Copy link

This issue was closed because it has been inactive for 3 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Pull request is stale type/bug Something isn't working
Projects
None yet
1 participant