pub struct WorkerConfig {
pub worker_id: String,
pub max_fetch_bytes: u32,
pub heartbeat_interval: Duration,
pub offset_dir: Option<PathBuf>,
pub start_position: SeekPosition,
}Expand description
Configuration for a grouped consumer (worker)
Fields§
§worker_id: StringUnique identifier for this worker
max_fetch_bytes: u32Maximum bytes to fetch per poll
heartbeat_interval: DurationHeartbeat interval
offset_dir: Option<PathBuf>Offset storage directory
start_position: SeekPositionStarting position for new topics
Implementations§
Source§impl WorkerConfig
impl WorkerConfig
Sourcepub fn with_max_fetch_bytes(self, bytes: u32) -> Self
pub fn with_max_fetch_bytes(self, bytes: u32) -> Self
Set max fetch bytes
Sourcepub fn with_heartbeat_interval(self, interval: Duration) -> Self
pub fn with_heartbeat_interval(self, interval: Duration) -> Self
Set heartbeat interval
Sourcepub fn with_offset_dir(self, dir: &Path) -> Self
pub fn with_offset_dir(self, dir: &Path) -> Self
Set offset storage directory
Sourcepub fn with_start_position(self, position: SeekPosition) -> Self
pub fn with_start_position(self, position: SeekPosition) -> Self
Set starting position
Trait Implementations§
Source§impl Clone for WorkerConfig
impl Clone for WorkerConfig
Source§fn clone(&self) -> WorkerConfig
fn clone(&self) -> WorkerConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkerConfig
impl RefUnwindSafe for WorkerConfig
impl Send for WorkerConfig
impl Sync for WorkerConfig
impl Unpin for WorkerConfig
impl UnwindSafe for WorkerConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request