Skip to content

Conversation

@MauriceVanVeen
Copy link
Member

This PR adds initial support for fast batch publish, currently being designed in ADR-50. An update to the ADR is proposed here to include details contained in this PR: nats-io/nats-architecture-and-design#387.

Most requirements are already included:

  • Add AllowBatchPublish to the StreamConfig at API level 3
  • Support for Nats-Fast-Batch-Id
  • Support for Nats-Batch-Gap: fail/ok
  • Support for Nats-Flow (only ack per N messages)
  • Support for Nats-Batch-Commit: 1/eob
  • Only respond with a PubAck at the end, and use the flow control message throughout.

This should be sufficient for now to benchmark fast ingest, but will need to be followed up later with additional PRs for:

  • Automatic adjusting of flow rate based on server load, up to the max configured Nats-Flow
  • Returning errors due to per-message consistency/expected header checks.
  • etc.

Certain details can still be iterated upon as needed.

Signed-off-by: Maurice van Veen [email protected]

@MauriceVanVeen
Copy link
Member Author

The individual commits could be squashed down prior to merge. Have left them separate for now to ease reviewing.

@github-actions github-actions bot added the stale This issue has had no activity in a while label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale This issue has had no activity in a while

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants