pub(crate) async fn close_and_settle(
logger: &mut Option<ParquetLogger>,
pending: &mut Vec<Message>,
channel: u8,
file_index: usize,
)Expand description
Closes the open file (if any) and settles the messages it holds.
On success the pending messages are acked. On failure they are dropped
without an ack, so JetStream redelivers them after ack_wait and they are
written again into a new file. With no open file, the pending messages are acked.
ยงArguments
logger- Open file of the channel;Noneon return.pending- Messages whose samples are in the open file; empty on return.channel- Channel number, for log messages.file_index- Part index of the open file, for log messages.