You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem description
It is not clear how to use the event writer to determine when the event has been durably persisted.
Based on logging, writer.write_event(payload).await returns even before the event has been sent across the wire.
Suggestions for an improvement
The documentation for EventStreamWriter.write_event() should be updated. Also, the example in event_write_and_read.rs should show how to await a durable write ack.
The text was updated successfully, but these errors were encountered:
This is not a very convenient API as it requires two awaits and then a match statement to flatten the result. It gets even more complicated without the anyhow macro.
let future = writer.write_event_by_routing_key(routing_key, event);
let receiver = future.await;
let result = receiver.await; // Result<Result<(), SegmentWriterError> RecvError>
let flattened_result = match result { // Result<(), Error>
Ok(r) => r.map_err(|e| anyhow!(e)),
Err(e) => Err(anyhow!(e)),
};
Is there anyway to get rid of the intermediate future? What is the benefit of it?
Problem description
It is not clear how to use the event writer to determine when the event has been durably persisted.
Based on logging,
writer.write_event(payload).await
returns even before the event has been sent across the wire.Problem location
EventStreamWriter.write_event()
andhttps://github.com/pravega/pravega-client-rust/blob/master/examples/event_write_and_read.rs#L65
Suggestions for an improvement
The documentation for
EventStreamWriter.write_event()
should be updated. Also, the example in event_write_and_read.rs should show how to await a durable write ack.The text was updated successfully, but these errors were encountered: