Comments (4)
It is allowed to have '+' and '#' in subscription topic.
from emqx-sn.
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.
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.
@jpmzometa The issue has been fixed in v2.3.5.
from emqx-sn.
Related Issues (20)
- mqtt-sn Gateway not working HOT 7
- Support of sleeping clients HOT 4
- QoS granted on SUBACK is ignored HOT 2
- Serial port support HOT 1
- Subsequent CONNECTs ignored by gateway
- UNSUBSCRIBE without a payload disconnects the client HOT 4
- qos -1 issue HOT 2
- undefined macro 'SN_RC_MQTT_FAILURE' HOT 7
- Setting the port to ::1:2000 causes error HOT 12
- CONNACK is not always sent to the client HOT 4
- Forward to mqtt server HOT 1
- Forwarder encapsulation
- Failure to accept Sn messages with v3 beta HOT 7
- SEARCHGW should always be answered by gateway
- Shutdown due to idle timeout HOT 12
- connection would be destroyed if mqtt-sn client send a 2nd CONNECT in connected state.
- QoS -1 Not Working HOT 1
- Options for transparent and aggregate sn gateway HOT 2
- Empty ClintId on connect HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emqx-sn.