Skip to content

[Rust] Document persistent streams - #765

Open
elenagaljak-db wants to merge 5 commits into
mainfrom
stack/eos-docs
Open

elenagaljak-db wants to merge 5 commits into
mainfrom
stack/eos-docs

Conversation

@elenagaljak-db

Copy link
Copy Markdown
Collaborator

What changes are proposed in this pull request?

This PR adds the user-facing documentation for the feature-gated persistent-stream API introduced by the preceding stack.

It adds a runnable JSON example that:

  • Creates a new durable stream when ZEROBUS_PERSISTENT_STREAM_ID is unset.
  • Prints the server-assigned stream_id so applications can persist it externally.
  • Resumes an existing stream when ZEROBUS_PERSISTENT_STREAM_ID is set.
  • Queues records in a loop and calls flush() once afterward, preserving the SDK ingestion pipeline.
  • Explains that close() ends the current connection without retiring the durable stream.

The Rust examples index and JSON README document how to run both the create and resume paths. This PR also adds the documentation entry to rust/NEXT_CHANGELOG.md.

Stack

  1. [Rust] Add persistent stream proto #761 — protobuf contract
  2. [Rust] Add persistent gRPC transport #762 — gRPC transport and recovery engine
  3. [Rust] Expose persistent stream API #763 — public Rust API
  4. [Rust] Test persistent streams #764 — stateful mock and integration tests
  5. Documentation and runnable example

How is this tested?

  • cargo check -p rust-examples-json --example json_persistent
  • cargo test -p tests --test persistent_stream_tests — 2 tests passed
  • cargo fmt --all -- --check
  • git diff --check

@elenagaljak-db
elenagaljak-db force-pushed the stack/eos-tests branch 2 times, most recently from 3848613 to 15972c6 Compare August 20, 2026 13:09
@elenagaljak-db
elenagaljak-db force-pushed the stack/eos-docs branch 2 times, most recently from 74d0146 to 5b4da5d Compare August 28, 2026 16:41
elenagaljak-db and others added 4 commits October 16, 2026 10:49
Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Replace the tuple that prepare_grpc returns with a crate-private
GrpcStreamParts struct, and import ZerobusClient and Channel instead of
using fully qualified paths. Addresses review nits on #763.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Move StreamBuilder::build into stream_builder/ephemeral.rs, and move
multiplexed() and multiplexed_ack_callback() into multiplexed.rs, so
mod.rs keeps the builder state and the setters that the persistent
builder also uses. No public API or behavior change. The Arrow Flight
setters and build_arrow() stay in mod.rs until the Arrow mux work in

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Import record_stream_creation and warn_payload_limit_ignored_for_arrow
at the top of the builder files instead of calling them through the
crate::client_warnings path. Addresses a review comment on #764.

Co-authored-by: Isaac <no-reply@databricks.com>
Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
Base automatically changed from stack/eos-tests to main October 16, 2026 11:44
@teodordelibasic-db
teodordelibasic-db self-requested a review October 16, 2026 13:52
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.

2 participants