Skip to content

RustQueue 0.8.3

Choose a tag to compare

@github-actions github-actions released this 29 Jul 16:05
· 2 commits to main since this release
37caa47

RustQueue 0.8.3

RustQueue 0.8.3 removes full in-flight deadline scans from the hot delivery
path while preserving the v7 storage format and durable acknowledgement
contract.

Deadline-indexed delivery

  • A durable Channel now keeps its active delivery deadlines in an ordered
    index alongside its ID lookup. Expiry checks visit only due deliveries rather
    than scanning the entire in-flight set on every fetch.
  • TCP sessions use the same pattern for their local delivery leases. The next
    timer comes directly from the earliest active lease; TOUCH, FIN, REQ,
    delivery handoff, completion, and disconnect keep the index consistent.
  • FIN and REQ operations in the asynchronous Channel pipeline are removed
    from the session deadline index while they are pending, then restored only
    if the operation fails. A successful operation removes both the ID lookup
    and deadline entry.

This is most relevant with high RDY values, long message timeouts, slow
consumers, and many active consumer connections. It lowers avoidable CPU work
and Topic-lock pressure without changing duplicate, timeout, or at-least-once
semantics.

Topic fsync and delivery concurrency

  • A publish group still serializes appends for one Topic and acknowledges only
    after the segment group has been fsynced.
  • The active segment file is now synced after releasing the Topic state lock.
    A separate commit gate keeps append, rotation, retention, and management
    changes serialized until that durable boundary completes.
  • Delivery reservation reads only through a durable position advanced after a
    successful sync. Consumers can therefore reserve earlier durable messages
    during the next group's fsync, but never observe the uncommitted tail.
  • Prometheus now exposes publish and delivery Topic-lock wait/hold histograms
    so mixed PUB/consume contention can be measured directly.

Explicit publish durability modes

  • queue.publish_ack_mode = "durable" remains the default and preserves
    acknowledgement-after-fsync semantics.
  • queue.publish_ack_mode = "write_ack" returns PUB, MPUB, and DPUB success
    after append/write, but consumers see only through last_durable_position.
  • queue.publish_ack_mode = "nsq_relaxed" returns after append/write and makes
    that tail immediately consumable, matching NSQ's relaxed diskqueue boundary
    more closely.
  • Both relaxed modes sync at the first of 2,500 messages, 8 MiB, or 10 ms by
    default. A sync failure isolates the broker from further writes.
  • Unsynced messages, bytes, last durable position, and sync lag are exposed in
    broker statistics and aggregate/bounded per-Topic Prometheus metrics.
  • Recovery preserves non-overlapping position gaps when an acknowledged
    relaxed tail disappears, preventing an older durable Channel ACK from
    skipping a later message. Recovered gaps are derived from segment ranges,
    Topic metadata, and durable Channel high-water marks; they do not consume
    Channel depth or its bounded ACK window.

NSQ comparison

NSQ v1.3.0 tracks in-flight timeouts with a priority queue, which exposed the
previous RustQueue scan as a direct scheduler mismatch. RustQueue now has the
same asymptotic deadline lookup shape, while keeping its own token-checked
delivery model.

Important throughput results still require a durability label:

  • RustQueue's default successful PUB, MPUB, and DPUB response follows a
    local segment group fsync. write_ack and nsq_relaxed are separately
    labelled weaker acknowledgement profiles. Successful FIN and REQ always
    cross a Channel WAL group fsync.
  • NSQ's diskqueue returns a write response before its next scheduled sync.
    Therefore NSQ --sync-every=1 is not equal to RustQueue's
    acknowledgement-after-fsync contract, and NSQ's default memory queue can
    further widen a raw-throughput result.
  • scripts/benchmark-compare.sh continues to run NSQ with
    --mem-queue-size=0 and emits strict and relaxed sync profiles separately.
    Consumer runs require complete unique delivery, no unexpected duplicates,
    and a drained Channel before a result is accepted.

docs/architecture/nsq-performance.md
records the concrete source-level differences and the next measurements worth
making before any durability trade-off.

Compatibility

  • On-disk format remains v7; no migration is required from 0.8.2.
  • NSQ V2 commands, TLS/mTLS, AUTH, compression, lookup, and the opt-in Kodo
    profile retain their existing compatibility contract.
  • The Broker remains share-nothing: one Broker owns one durable RWO PVC and
    the release does not add replica-based message durability.

Assets

  • rustqueue-0.8.3-linux-x86_64.tar.gz: Linux x86_64 binaries, Console UI and
    example configuration
  • rustqueue-0.8.3-linux-aarch64.tar.gz: Linux ARM64 binaries, Console UI and
    example configuration
  • rustqueue-0.8.3-source.tar.gz: source archive for the tagged commit
  • rustqueue-0.8.3.tgz: Helm Chart
  • SHA256SUMS-0.8.3: SHA-256 checksums for all assets