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: 客户端不支持连接RocketMQ5集群 #377

Closed
Richelieu42 opened this issue Mar 2, 2023 · 6 comments · Fixed by #444
Closed

Golang: 客户端不支持连接RocketMQ5集群 #377

Richelieu42 opened this issue Mar 2, 2023 · 6 comments · Fixed by #444
Assignees
Labels
Golang type/bug Something isn't working

Comments

@Richelieu42
Copy link

尝试在Consumer实例执行Start()前通过reflect修改其内部的Address,但没用。
PS:查了下Java客户端依赖,是支持通过“;”连接RocketMQ5集群的。

@aaron-ai
Copy link
Member

aaron-ai commented Mar 2, 2023

可以更加详细描述一下问题吗?; 是指有多个 RocketMQ 接入点?

@Richelieu42
Copy link
Author

是的,有多个 RocketMQ 接入点。
(1)使用Java依赖,可以连接RocketMQ5集群(多个接入点)。
image
(2)使用Golang依赖,则无法连接RocketMQ5集群(多个接入点),查了下源码,并没有对“;”进行处理。
image

官方是否有Golang连接RocketMQ5集群(多个接入点)的demo,有的话能否提供下?

@francisoliverlee francisoliverlee added Golang type/bug Something isn't working labels Mar 30, 2023
@francisoliverlee
Copy link
Member

这个确实一个bug, golang把传入的target当作一个地址处理的。感兴趣的话, 老哥可以提个PR修复下

@Anakin100100
Copy link
Contributor

@francisoliverlee Could you describe the issue in English? I'd be happy to solve it but I don't really get the core of the problem from the Google Translate translation.

@imp2002
Copy link
Contributor

imp2002 commented Apr 4, 2023

I am interested in it, could you assign it to me? @aaron-ai

@francisoliverlee
Copy link
Member

francisoliverlee commented Apr 6, 2023

@francisoliverlee Could you describe the issue in English? I'd be happy to solve it but I don't really get the core of the problem from the Google Translate translation.

i am sorry to make you confused .
golang client does support more than one address. the address should be combine like "127.0.0.1:8000;127.0.0.2:8000", but golang sdk does not split it with ";"

https://user-images.githubusercontent.com/115224697/222365347-aa4bdf84-ce97-45cc-9b40-f74b36f95862.png

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

Successfully merging a pull request may close this issue.

5 participants