Skip to content

rocketmq SDK的使用 #7918

Answered by pxd98
scwlkq asked this question in Q&A
Mar 14, 2024 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

这个应该是看你上层的请求,如果你的请求是往nameserver发的,应该填null,如果往broker发的,就填broker的url。
比如你这个请求是sendmessage,就应该是填brokerurl,如果你的请求是查询topic的路由信息,就应该填null。
如果仅仅是使用这个sdk的话,应该直接用类似于producer.setNamesrvAddr(“namesrvAddr”)就可以了,sdk里会自动帮你判断的;除非你是想直接用这个接口。

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@scwlkq
Comment options

@pxd98
Comment options

Answer selected by scwlkq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants