Comments (4)
This bit of code happens when the thread that wants to add a command to a queue is the thread that handles the queue the command is added to. This only happens for Acknowledge messages, which should have priority and skip the queue.
from moquette.
This bit of code happens when the thread that wants to add a command to a queue is the thread that handles the queue the command is added to. This only happens for Acknowledge messages, which should have priority and skip the queue.
I cannot find in the source code where the EventLoop thread is used to handle the addition of commands. Therefore, I believe the above code will never be execute,So is there still a need for that code segment?
from moquette.
Indeed, this currently also happens for Publish commands if the publisher is on the same thread as the receiver. And this indeed causes these publishes to jump the queue.
There are cases where the command must jump the queue. For instance the SessionRegistry::remove()
has the goal of cleaning up the queues. If this happens because the client re-connected with cleanSession=true, this will be called from the same thread, and it should probably happen directly (not entirely sure there).
We may have to add a flag to indicate the action should jump the Queue or not.
from moquette.
be
Indeed, this currently also happens for Publish commands if the publisher is on the same thread as the receiver. And this indeed causes these publishes to jump the queue.
There are cases where the command must jump the queue. For instance the
SessionRegistry::remove()
has the goal of cleaning up the queues. If this happens because the client re-connected with cleanSession=true, this will be called from the same thread, and it should probably happen directly (not entirely sure there).We may have to add a flag to indicate the action should jump the Queue or not.
I debugged the source code and realized that you were right. I will close the issue. Thank you for your patient response.
from moquette.
Related Issues (20)
- Does the moquette supports MQTT 5? (question) HOT 2
- io.netty.util.IllegalReferenceCountException: refCnt: 0 HOT 1
- Change signature of IRetainedRepository.retainedOnTopic to reflect the fact it return unordered collection HOT 1
- Generalize ExpirableTracker to become an scheduler service
- Server can define its own Keep Alive in CONNACK
- [Meta] Implement Shared Subscriptions HOT 1
- Support topic that starts with `$` character
- The official example code is misleading and may cause Java OutOfMemoryError. HOT 1
- Implement Subscription identifier
- Implements Subscription Options HOT 1
- java.lang.NoSuchMethodError: No static method encodeHexString([B)Ljava/lang/String; in class Lorg/apache/commons/codec/binary/Hex; or its super classes (declaration of 'org.apache.commons.codec.binary.Hex' appears in /system/framework/org.apache.http.legacy.boot.jar) HOT 2
- Implement message expiry intervals functionality HOT 1
- publish2Subscribers(payload, topic, qos); catch Exception java.lang.NullPointerException: null HOT 3
- io.moquette.broker.SessionCorruptedException: Session has already changed state: Session{clientId='xxx', clean=true, status=CONNECTING, inflightSlots=10} HOT 3
- Payload format and content type
- Request / Response: Formalize the request/response pattern within MQTT
- High CPU usage when MQTT client disconnect and reconnect
- Shrared buffer issues due to readerIndex
- The shared subscription was not successful.
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 moquette.