Skip to content

Conversation

@VivekPipaliya23
Copy link

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 x in the boxes that apply

  • Bugfix (non-breaking change which fixes issue #XXXX)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation (correction or otherwise)
  • Cosmetics (whitespace, styles...)
  • DevOps (Build scripts, pipelines...)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating
the 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.

  • I have read the CODE_OF_CONDUCT.md document
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if needed)
  • Any dependent changes have been merged and published in related repositories
  • I have updated changelog (At the bottom of the release version)
  • I have squashed all my commits into one before merging

Further 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.

@VivekPipaliya23 VivekPipaliya23 force-pushed the feature/end-to-end-delivery branch from 129d76d to 787b29b Compare November 28, 2025 09:57
Bin = vmq_parser:serialise(#mqtt_puback{message_id = MsgId}),
maybe_flush(State#st{pending = [Pending | [Bin]]});
false ->
{exit, {invalid_msg_id, MsgId}, State}
Copy link
Member

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?

Copy link
Author

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.

#matched_acl{name = Name},
Persisted
]),
DelayPuback = should_send_puback(Name),
Copy link
Member

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants