Comments (4)
@mths1 We would want it to disconnect in both cases but mosquitto is a re-connecting client.
Can you add the debug option (-d) to
mosquitto_sub` to see the different behaviour?
👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.
from vernemq.
On one hand, it seems I am really observing some implementation detail of mosquitto sub, on the other hand VerneMQ closes the session differently with (-c and without):
vmq-admin session disconnect client-id=test1
mosquitto_sub -t test -d -i test1 -V 5
Client test1 sending CONNECT
Client test1 received CONNACK (0)
Client test1 sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0, Options: 0x00)
Client test1 received SUBACK
Subscribed (mid: 1): 0
Received DISCONNECT (152)
vmq-admin session disconnect client-id=test1 -c
mosquitto_sub -t test -d -i test1 -V 5
Client test1 sending CONNECT
Client test1 received CONNACK (0)
Client test1 sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0, Options: 0x00)
Client test1 received SUBACK
Subscribed (mid: 1): 0
Client test1 sending CONNECT
Client test1 received CONNACK (0)
Client test1 sending SUBSCRIBE (Mid: 2, Topic: test, QoS: 0, Options: 0x00)
Client test1 received SUBACK
Subscribed (mid: 2): 0
MQTTv3 always reconnects
Client test1 sending CONNECT
Client test1 received CONNACK (0)
Client test1 sending SUBSCRIBE (Mid: 1, Topic: test, QoS: 0, Options: 0x00)
Client test1 received SUBACK
Subscribed (mid: 1): 0
Client test1 sending CONNECT
Client test1 received CONNACK (0)
Client test1 sending SUBSCRIBE (Mid: 2, Topic: test, QoS: 0, Options: 0x00)
Client test1 received SUBACK
Subscribed (mid: 2): 0
from vernemq.
Thanks, so it's about whether the DISCONNECT
is received or not.
We can check if it's the network or the implementation.
Can you add something like the following options to vernemq.conf
: (the point is to set the linger option to something other than 0):
tcp_listen_options = [{nodelay, true}, {linger, {true, 6}}, {send_timeout, 30000}, {send_timeout_close, true}]
👉 Thank you for supporting VerneMQ: https://github.com/sponsors/vernemq.
👉 Using the binary VerneMQ packages commercially (.deb/.rpm/Docker) requires a paid subscription.
from vernemq.
I close this, as it is an implementation detail of mosquitto. The tcl_listen_options did not change the behaviour.
from vernemq.
Related Issues (20)
- 500 server error in publish response (vmq_http_pub) HOT 5
- Drop OTP24, add OTP27 support HOT 3
- [Bug]: Node failure causes cluster restart HOT 7
- MQTT Client Authentication getting failed due to plugin_chain_exhausted HOT 3
- [Bug]: plugins.vmq_webhooks is on but not triggering HTTP endpoint HOT 3
- [Bug]: Error on cluster startup HOT 2
- [Bug]: Downloading too many/big CRLs leads to broker crash HOT 4
- [Bug]: CPU grows for steady state systems HOT 11
- how to read the retain messages stored in the leveldb of vernemq HOT 1
- [Bug]: Cannot connect VMQ Diversity to Atlas HOT 14
- [Bug]: The Status page always shows client offline when connecting to broker HOT 23
- Error adding node to cluster HOT 4
- [Bug]: Vernemq webhooks not supporting HTTP(s) HOT 7
- [Bug]: vmq-diversity Lua language. The os.time function generates a current epoch timestamp when given a specific date. HOT 2
- Message Loss is occurring on the shared subscriptions HOT 3
- shared_subscriptions - not working Vernemq 1.9.0 HOT 2
- Misconfigured MYSQL2 causes badmatch error HOT 2
- VerneMQ pod crash because of high cpu utilization HOT 1
- [Bug]: <title>Verneq service restart fails when there is a client connection and pending queue. HOT 4
- [Bug]: Still seeing empty sync issues with 2.0.1 HOT 39
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 vernemq.