-
Notifications
You must be signed in to change notification settings - Fork 153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QoS 1 PUBLISH must not be resent during the same connection #491
Comments
Hi HiwayChe, |
Hi @LBrandl, |
The broker should not resend the message to the MQTT v5 client if it doesn't reconnect. Maybe the resend behaviour is configurable. Could be worth checking the broker documentation on that. |
@LBrandl thanks for yr reply. I report this question to emqx |
Timeouts for ACKs are not intended by the MQTT v5 spec, therefore you will not find any details about retries in this case. Both client and broker are not supposed to resend messages if the connection is stable. |
I close this issue here as this is a bug of emqx. |
@SgtSilvio, if consumer ack timeout or lost on the internet, broker not resend same message to consumer, so how does broker guarantee qos 1 (message must be delivered at least once). From the view of broker, it should resend message if not receive ack, only in this way it can guarantee qos 1 in my opinion. |
@SgtSilvio, the hivemq client 1.2.2 disconnects with error "QOS1 publish must not be resent during the same connection" if a QOS1 message is resent by the broker in case the message was not acknowledged earlier. |
Hi, I am using mqtt-1.2.2.jar as client to sub with broker, my broker is emqx-4.2.2, my iot equipment use mqttV3.1 to pub and my java code use mqttV5 to sub(I don't know if it is ok to use different mqtt version protocol to sub and pub).
Sometimes there will be an error message in log:
2021-06-09 19:29:30.806 [com.hivemq.client.mqtt-10-2] ERROR c.h.c.i.m.h.p.incoming.MqttIncomingQosHandler:51 - QoS 1 PUBLISH (MqttStatefulPublish{stateless=MqttPublish{topic=BGT1/1918BD000186/PeriodReportBin, payload=65byte, qos=AT_LEAST_ONCE, retain=false}, packetIdentifier=419, dup=false, topicAlias=0, subscriptionIdentifiers=[9]}) must not be resent (MqttStatefulPublish{stateless=MqttPublish{topic=BGT1/1918BD000186/PeriodReportBin, payload=65byte, qos=AT_LEAST_ONCE, retain=false}, packetIdentifier=419, dup=true, topicAlias=0, subscriptionIdentifiers=[9]}) during the same connection
I viewed the source code:
com.hivemq.client.internal.mqtt.handler.publish.incoming.MqttIncomingQosHandler#readPublishQos1
I wonder why
QoS 1 PUBLISH must not be resent during the same connection
? I did not find detailed message in mqtt5 spec(https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html#_Toc3901236).The text was updated successfully, but these errors were encountered: