Comments (4)
Hi @calliday
It has been fixed in 5.6.0.
#12492
from emqx.
Ah, thank you! I will upgrade and test when I am able to.
from emqx.
After testing, I see that the Receive Maximum is being sent in the CONNACK.
However, I found that if the bridging broker (Mosquitto, in this case) sends more PUBLISH messages than the Receive Maximum established by EMQX, EMQX doesn't send a DISCONNECT packet to indicate that the Receive Maximum wasn't honored.
In my case, EMQX's Receive Maximum was set to 10 and Mosquitto's was set to 50. Mosquitto sends 50 in quick succession, and then after the first PUBACK is received it continues to send more PUBLISH messages. No DISCONNECT is sent by EMQX when this happens.
Mosquitto has a bug, where it doesn't honor the Receive Maximum, but it also appears that EMQX has a bug in that it doesn't tell the broker to disconnect when the Receive Maximum is not honored.
The messages logged by Mosquitto:
*** SEND 50 QUEUED PUBLISH MESSAGES ON STARTUP ***
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5733, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5734, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5735, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5736, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5737, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5738, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5739, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5740, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d1, q1, r0, m5741, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5742, 'bridge/test', ... (38 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5743, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5744, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5745, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5746, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5747, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5748, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5749, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5750, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5751, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5752, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5753, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5754, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5755, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5756, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5757, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5758, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5759, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5760, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5761, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5762, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5763, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5764, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5765, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5766, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5767, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5768, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5769, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5770, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5771, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5772, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5773, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5774, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5775, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5776, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5777, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5778, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5779, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5780, 'bridge/test', ... (40 bytes))
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5781, 'bridge/test', ... (40 bytes))
1714078788: Received UNSUBACK from local.bridge
1714078788: Received UNSUBACK from local.bridge
1714078788: Received UNSUBACK from local.bridge
1714078788: Received UNSUBACK from local.bridge
1714078788: Received UNSUBACK from local.bridge
1714078788: Received SUBACK from local.bridge
*** RECEIVE FIRST PUBACK AND SEND A PUBLISH ***
1714078788: Received PUBACK from local.bridge (Mid: 5732, RC:16)
1714078788: Sending PUBLISH to local.bridge (d0, q1, r0, m5782, 'bridge/test', ... (40 bytes)
*** NO DISCONNECT SEEN ***
from emqx.
I would not call it a bug.
All you can tell from the logs is mosquitto managed to put more than MAX number of messages on wire (more likely in the socket send buffer), there is no evidence to say that EMQX has actually received more than MAX number of messages pending on PUBACK back to the client.
For QoS 1 messages, EMQX just tries its best to process.
loop() ->
wait_for_PUBLISH
dispatch_to_subscribers
send_PUBACK
loop()
Even if the client is able to send more than negotiated MAX, the MAX-1 messages will be inflight:
- in client side socket send buffer pending for send
- in server side socket buffer pending for receive
- in Erlang process (actor) receive queue (but still raw bytes, i.e. before decoded, which technically should not be counted as received)
For QoS 2 messages however, since it has to maintain a inflight state which has a size limit, you should be able to observe DISCONNECT with reason code 0x93
.
from emqx.
Related Issues (20)
- Unable to force-leave stale nodes HOT 12
- Enhanced Authentication Failed with Reason Code 135 (Not Authorized). HOT 9
- Configuration fails to take effect about TCP Keep Alive behavior HOT 6
- Grafana dashboard should use $__rate_interval HOT 3
- Customizable HTTP Server Actions (Sink) Retry Policies HOT 2
- Can not view retained messages in admin dashboard after updating to 5.6.0 from 5.5.1 HOT 7
- 使用 MongoDB4.0 进行密码认证,无法成功接入数据源。 HOT 6
- Can't add users on touch screen device HOT 7
- Action output to external HTTP server - authorization header issue HOT 2
- The client disconnects after publish message whose topic starts with '$' HOT 2
- Not getting Emqx dashboard HOT 1
- EMQX Clustering - Message Replication HOT 4
- STOMP GW does not send heartbeat to client HOT 4
- EMQX cluster cannot restart after persistence HOT 1
- After STOMP enables authentication, authentication fails when the account password carries a colon
- runq_overload everyday for few minutes HOT 4
- ~10ms latency on publishing and receiving message on the same machine on windows HOT 6
- webhook监听上下线事件时,事件时序有误,原因不明(connected and disconnected events may out of order) HOT 3
- Authentication fails periodically and restart fixes it HOT 9
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.