-
Notifications
You must be signed in to change notification settings - Fork 3
Feature: end to end delivery #85
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
base: main
Are you sure you want to change the base?
Conversation
129d76d to
787b29b
Compare
apps/vmq_server/src/vmq_ranch.erl
Outdated
| Bin = vmq_parser:serialise(#mqtt_puback{message_id = MsgId}), | ||
| maybe_flush(State#st{pending = [Pending | [Bin]]}); | ||
| false -> | ||
| {exit, {invalid_msg_id, MsgId}, State} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it be right to exit or terminate publisher process if subscriber sends a wrong mid?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoided exit and added error log.
apps/vmq_server/src/vmq_mqtt_fsm.erl
Outdated
| #matched_acl{name = Name}, | ||
| Persisted | ||
| ]), | ||
| DelayPuback = should_send_puback(Name), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be part of maybe_send_puback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Proposed Changes
Introduced a delay_qos1_puback setting, allowing operators to choose deferred QoS1 acknowledgements. The MQTT FSM now tracks this setting, sending immediate PUBACKs when disabled, or delaying them until subscriber PUBACKs are received when enabled. When delayed, PUBACKs are handled sequentially and sent back to the originating ranch process after the subscriber ACKs, maintaining the default behavior.
Types of Changes
What types of changes does your code introduce to this project?
Put an
xin the boxes that applyChecklist
Put an
xin the boxes that apply. You can also fill these out after creatingthe PR. If you're unsure about any of them, don't hesitate to ask on the
mailing list. We're here to help! This is simply a reminder of what we are
going to look for before merging your code.
CODE_OF_CONDUCT.mddocumentFurther Comments
If this is a relatively large or complex change, kick off the discussion by
explaining why you chose the solution you did and what alternatives you
considered, etc.