OptionaldebugName: stringReadonlyappendReadonlybatchReadonlypumpReadonlyreadableReadonlytransformReadonlytransformReadonlywritableClose the Producer gracefully.
Waits for all pending records to be flushed, submitted, and acknowledged. If any error occurred during the Producer's lifetime, this method throws it.
Force the current partial batch to be emitted and wait for every record submitted before this call to become durable.
An empty flush does not append a batch. Submissions queued after this call are excluded, and the Producer remains open for further submissions. If a append included in this flush fails, this throws the same terminal error as its record ticket.
Submit a single record for appending.
Returns a promise that resolves to a RecordSubmitTicket once the record has been accepted. The promise blocks if the underlying AppendSession is at capacity (backpressure is applied via the transform stream).
Producer provides per-record append semantics on top of a batched AppendSession.
See the "Producer API" section of the root README for guidance on sizing batches, wiring transforms, and handling application-level ids.
Example