Giter VIP home page Giter VIP logo

Comments (4)

grutabow avatar grutabow commented on August 20, 2024

It is allowed to have '+' and '#' in subscription topic.

from emqx-sn.

jpmzometa avatar jpmzometa commented on August 20, 2024

Hi, you are right. The client can SUBSCRIBE using wildcards, I just observed some weird behaviour and thought that feature was not implemented. Namely, the broker does not wait for a REGACK before sending the PUBLISH message. Additionally, the broker does not send a REGISTER package to the client to let it know the topic number of a topic that matches the wildcard, if the client re-CONNECTS using a clean session without DISCONNECTing first. For example, if I have two clients (c1 and c2), I observed the following sequence:
c1:
-> connect
<- connack
-> subscribe (topic name A/+/1)
<- suback (topic id = 0)
c2:
-> connect
<- connack
-> register (topic name A/B/1)
<- regack (topic id = 1)
-> publish (in topic A/B/1, qos=0)
c1:
<- register (topic name A/B/1, id = 1)
-> regack *(if the client does not REGACK, the publish message is sent nevertheless)
<- publish (in topic A/B/1, qos=0)
Up to this point everything is good (except for *). But if c1 connects at this point using a clean session without previously disconnecting, the register message is not sent anymore. E.g.
c1
-> connect (clean session)
<- connack
-> subscribe (topic name A/+/1)
<- suback (topic id = 0)
c2:
-> publish (in topic A/B/1, qos=0)
c1:
(Here I would have expected the REGISTER of the topic)
<- publish (in topic A/B/1, qos=0)

The REGISTER is sent to the client if c1 DISCONNECT before re-CONNECTing with clean session.

from emqx-sn.

grutabow avatar grutabow commented on August 20, 2024

Your are right. From the view of client, broker should destroy all the registered topic since clean-session is true. Please be patient for the fix.

from emqx-sn.

emqplus avatar emqplus commented on August 20, 2024

@jpmzometa The issue has been fixed in v2.3.5.

from emqx-sn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.