emqx / emqx-coap

EMQX CoAP Gateway
https://www.emqx.com
Apache License 2.0
62 stars 34 forks source link

Subtopic doesn't work #85

Open rjbaat opened 6 years ago

rjbaat commented 6 years ago

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 commented 6 years ago

@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 commented 6 years ago

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 commented 6 years ago

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

rjbaat commented 6 years ago

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 commented 6 years ago

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