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

Subtopic doesn't work #85

Open
rjbaat opened this issue Sep 13, 2018 · 5 comments
Open

Subtopic doesn't work #85

rjbaat opened this issue Sep 13, 2018 · 5 comments
Assignees
Milestone

Comments

@rjbaat
Copy link

rjbaat commented Sep 13, 2018

Hi , I have tested this plugin with 2.3.11 and it works. I can pub/sub to a topic.
But when doing a pub to topic/subtopic it doesn't work.

What do i do wrong and how to get that working?

Also what does it mean to mandatory use mqtt in the topic url?
When i add it to the url it works, but not when i leave it out.

@terry-xiaoyu
Copy link
Member

terry-xiaoyu commented Sep 17, 2018

@rjbaat What version of EMQ are you using?

Is it 3.0 beta.1 or beta.2? We're updating this this plugin so it would work at EMQ X 3.0 beta.3. Thanks.

If it is 2.3.11, here're some examples to do pub/sub.
Could you give me some more details which command doesn't work? And the error logs?

@rjbaat
Copy link
Author

rjbaat commented Sep 17, 2018

I used 2.3.11 indeed. And with a single /mqtt/topic its working. But i am not sure how to pub/sub to a sub sub sub topic for example:
mqtt/topic/subtopic When doing: mqtt/topic%2Fsubtopic. EMQ sees: topic%2Fsubtopic not: topic/subtopic

@terry-xiaoyu
Copy link
Member

Try to use mqtt/topic/subtopic instead of mqtt/topic%2Fsubtopic.

@rjbaat
Copy link
Author

rjbaat commented Sep 18, 2018

Well i tried that at first, but then it won't subscribe at all. It will only subscribe with only a parent topic. With subtopic it won't subscribe.

@terry-xiaoyu
Copy link
Member

@rjbaat I'll fix this on 3.0 beta.3, which will be released this weekend. Thanks.

terry-xiaoyu added a commit that referenced this issue Sep 19, 2018
Prior to this change, emqx-coap only support percent-encoded topic in
CoAP URI, e.g. `coap://127.0.0.1/mqtt/a%2Fb%2F1%2F%23` means subscribe to a
MQTT topic `a/b/1/#`.

But clients who send a CoAP GET request like: `coap://127.0.0.1/mqtt/a/b/1/%23`
should also subscribe to topic: `a/b/1/#`. It is simpler and make
more sense.

This commit added this feature.
@terry-xiaoyu terry-xiaoyu added this to the 3.0-beta.3 milestone Sep 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants