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

mqant路由问题 #143

Open
Creat-qc opened this issue Nov 14, 2023 · 3 comments
Open

mqant路由问题 #143

Creat-qc opened this issue Nov 14, 2023 · 3 comments

Comments

@Creat-qc
Copy link

我在 服务器 端,在gate模块下定义了一个 HD_chat 的路由请求,g.GetServer().RegisterGO("HD_chat", g.FaceChat),为什么在 客户端 可以使用 topic为 gate/HD_chat/face 发送成功,request, err := w.Request("gate/HD_chat/face", []byte(str)), 原因感觉是路由匹配的机制,但是心里不能够确定,查了一下MQTT的主题匹配,有一些匹配符可以起到这样的作用,但是mqant中没有显示出这一点,所以问下前辈

@liangdas
Copy link
Owner

request, err := w.Request("gate/HD_chat/face", []byte(str))是啥意思?

@liangdas
Copy link
Owner

没太理解你说的意思哈,你可以把详细的日志附上

@Creat-qc
Copy link
Author

我忘了总结问题是什么了,这个问题是 客户端 订阅的 topic 是 gate/HD_chat/face ,然后 服务器端 gate模块 声明的 id是 HD_chat,我知道前面的chat 是表示 模块的id,用于匹配的,我不懂的地方是为什么 我订阅的路径后面多了个face,但是 发送消息的时候仍然可以发送成功,这个没有日志前辈,我截个代码的图你看看。
Snipaste_2023-11-14_11-33-04
Snipaste_2023-11-14_11-33-04

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

No branches or pull requests

2 participants