Flush all the inflight events into Pravega Stream. This will ensure all the inflight events are completely persisted on the Pravega Stream.
Note that write_event(...)
and write_event_bytes(...)
api send the payload to a background task
called reactor to process, so Promise.resolve
of these methods only means the payload has been sent
to the reactor. If the max_inflight_events
is not 0 when creating the writer, there may be some
events that are not persisted on the Pravega Stream.
Promise
Write an event into the Pravega Stream. The events that are written will appear
in the Stream exactly once. The event of type string is converted into bytes with UTF-8
encoding.
Note that the implementation provides retry logic to handle connection failures and service host failures. Internal retries will not violate the exactly once semantic so it is better to rely on them than to wrap this with custom retry logic.
Promise
String that want to be written to the Pravega Stream.
Optional
routing_key: string(optional) The user specified routing key.
Write a byte array into the Pravega Stream. This is similar to write_event(...)
api except
that the the event to be written is a byte array.
Note that the implementation provides retry logic to handle connection failures and service host failures. Internal retries will not violate the exactly once semantic so it is better to rely on them than to wrap this with custom retry logic.
Promise
Byte array that want to be written to the Pravega Stream.
Optional
routing_key: string(optional) The user specified routing key.
Generated using TypeDoc
A writer for a Stream.
Note: A StreamWriter cannot be created directly without using the StreamManager.