public static interface StreamsServiceGrpc.AsyncService
| Modifier and Type | Method and Description |
|---|---|
default io.grpc.stub.StreamObserver<AppendRequest> |
appendSession(io.grpc.stub.StreamObserver<AppendSessionResponse> responseObserver)
Appends records to multiple streams atomically within a single transaction.
|
default io.grpc.stub.StreamObserver<AppendRequest> appendSession(io.grpc.stub.StreamObserver<AppendSessionResponse> responseObserver)
Appends records to multiple streams atomically within a single transaction. This is a client-streaming RPC where the client sends multiple AppendRequest messages (one per stream) and receives a single AppendSessionResponse upon commit. Guarantees: - Atomicity: All writes succeed or all fail together - Optimistic Concurrency: Expected revisions are validated for all streams before commit - Ordering: Records within each stream maintain send order Current Limitations: - Each stream can only appear once per session (no multiple appends to same stream) Example flow: 1. Client opens stream 2. Client sends AppendRequest for stream "orders" with 3 records 3. Client sends AppendRequest for stream "inventory" with 2 records 4. Client completes the stream 5. Server validates, commits, returns AppendSessionResponse with positions