Struct async_nats::jetstream::consumer::pull::BatchConfig
source · pub struct BatchConfig {
pub batch: usize,
pub expires: Option<Duration>,
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<Duration>
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§
source§impl Clone for BatchConfig
impl Clone for BatchConfig
source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BatchConfig
impl Debug for BatchConfig
source§impl Default for BatchConfig
impl Default for BatchConfig
source§fn default() -> BatchConfig
fn default() -> BatchConfig
source§impl PartialEq for BatchConfig
impl PartialEq for BatchConfig
source§impl Serialize for BatchConfig
impl Serialize for BatchConfig
impl Copy for BatchConfig
impl Eq for BatchConfig
impl StructuralPartialEq for BatchConfig
Auto Trait Implementations§
impl Freeze for BatchConfig
impl RefUnwindSafe for BatchConfig
impl Send for BatchConfig
impl Sync for BatchConfig
impl Unpin for BatchConfig
impl UnwindSafe for BatchConfig
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)