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

The message mode was wrong in the heartbeat data. #471

Closed
DandelionJR opened this issue Apr 21, 2020 · 6 comments · Fixed by #472
Closed

The message mode was wrong in the heartbeat data. #471

DandelionJR opened this issue Apr 21, 2020 · 6 comments · Fixed by #472
Assignees
Labels
bug Something isn't working

Comments

@DandelionJR
Copy link
Contributor

我在测试rocketmq时,消费者订阅采用的是BROADCASTING,页面上却显示为CLUSTERING。我在源码中仔细查找,发现写死CLUSTERING,如下所示:
c.consumerMap.Range(func(key, value interface{}) bool { consumer := value.(InnerConsumer) cData := consumerData{ GroupName: key.(string), CType: "PUSH", MessageModel: "CLUSTERING", Where: "CONSUME_FROM_FIRST_OFFSET", UnitMode: consumer.IsUnitMode(), SubscriptionDatas: consumer.SubscriptionDataList(), } hbData.ConsumerDatas.Add(cData) return true })
这段代码在internal.client.go的SendHeartbeatToAllBrokerWithLock中,当我改变MessageModel的值为BROADCASTING时,页面上显示为BROADCASTING,请问这是bug还是我自己测试错误

@ShannonDing ShannonDing changed the title golang客户端消费者订阅时写的模式和页面客户端上显示的不一致 The message mode was wrong in the heartbeat data. Apr 21, 2020
@ShannonDing ShannonDing added the bug Something isn't working label Apr 21, 2020
@ShannonDing
Copy link
Member

yes, It is a bug. the message mode should be getting from the inner client and set here in the heartbeat data. then it will be sent to the broker.
Could you pls create a PR to fix it?

@DandelionJR
Copy link
Contributor Author

Ok, I'm looking at the interface method of the inner client. I haven't found where the model is, but I can clearly find it from the debug. I want to study it furtherly.

@ShannonDing
Copy link
Member

Maybe you can refer to the implementation logic of IsUnitMode().

@DandelionJR
Copy link
Contributor Author

Thanks, i know how to solve it

DandelionJR pushed a commit to DandelionJR/rocketmq-client-go that referenced this issue Apr 21, 2020
@DandelionJR
Copy link
Contributor Author

I have solved this problem, you can review it, thanks

@ShannonDing
Copy link
Member

GJ, I find that you create a PR on the release 2.0.0 branch, could you please move this PR to the native branch?
we should not modify the branch which has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants