Struct async_nats::jetstream::consumer::pull::BatchConfig
source · pub struct BatchConfig {
pub batch: usize,
pub expires: Option<usize>,
pub no_wait: bool,
pub max_bytes: usize,
pub idle_heartbeat: Duration,
}
Expand description
Used for next Pull Request for Pull Consumer
Fields
batch: usize
The number of messages that are being requested to be delivered.
expires: Option<usize>
The optional number of nanoseconds that the server will store this next request for before forgetting about the pending batch size.
no_wait: bool
This optionally causes the server not to store this pending request at all, but when there are no messages to deliver will send a nil bytes message with a Status header of 404, this way you can know when you reached the end of the stream for example. A 409 is returned if the Consumer has reached MaxAckPending limits.
max_bytes: usize
Sets max number of bytes in total in given batch size. This works together with batch
.
Whichever value is reached first, batch will complete.
idle_heartbeat: Duration
Setting this other than zero will cause the server to send 100 Idle Heartbeat status to the client
Trait Implementations
sourceimpl Clone for BatchConfig
impl Clone for BatchConfig
sourcefn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more