ExperimentalReadonly ExperimentalproducerStable identity of this producer.
Readonly ExperimentalwritableA WritableStream view of this producer, to pipe a source into it, e.g. with
ReadableStream.pipeTo or Node's stream/promises pipeline. Writing sends the
record, closing the stream closes the producer and aborting it aborts the producer.
ExperimentalCloses the producer immediately, without flushing. Every pending operation rejects
with reason.
Optionalreason: unknownExperimentalFlushes the producer, then closes its stream.
ExperimentalWaits until every record sent so far is durably committed.
the commit watermark, or -1 if nothing was sent.
ExperimentalSends a record.
The returned promise resolves with the record offset once the producer has accepted the
record into its buffer (or, with bufferBytes: 0, written it to the stream), waiting
while the buffer is full. With waitCommitted, it resolves once Restate has durably
committed the record instead.
Always await send: calls that are not awaited keep waiting for buffer space without
any bound. Records are sent in call order, so concurrent calls, e.g. with Promise.all,
are safe. Note that a record rejected by validation (an oversized record, or a
non-increasing exactly-once offset) rejects only its own call, while the others are
still sent: with an exactly-once producer, validate records before sending them
concurrently, or the commit watermark can move past the rejected offset.
Optionalopts: SendOptions
Sends invocations to Restate with exactly-once delivery: Restate deduplicates records on
(producerId, offset), across streams and restarts. After a restart, resend from the last checkpointed offset and Restate drops the records it already committed.