pub struct ConsumerOptiopns<'a> { /* private fields */ }Expand description
Configuration options for Consumers
Implementations§
Source§impl<'a> ConsumerOptiopns<'a>
impl<'a> ConsumerOptiopns<'a>
Sourcepub fn from(
bootstrap_servers: String,
group_id: String,
session_timeout_ms: String,
enable_auto_commit: bool,
enable_partition_eof: bool,
other_options: HashMap<&'a str, &'a str>,
) -> Self
pub fn from( bootstrap_servers: String, group_id: String, session_timeout_ms: String, enable_auto_commit: bool, enable_partition_eof: bool, other_options: HashMap<&'a str, &'a str>, ) -> Self
Creates a new ConsumerOptiopns
§Arguments
bootstrap_servers- Comma separated bootstrap serversgroup_id- The group_id of the consumersession_timeout_ms- The session timeout in millisecondsenable_auto_commit- Enable auto commitenable_partition_eof- Enable partition eof
§Example
use simple_kafka::ConsumerOptiopns;
let consumer_options = ConsumerOptiopns::from("localhost:9092".to_string(), "group_id".to_string(), "5000".to_string(), true, true, HashMap::new());Auto Trait Implementations§
impl<'a> Freeze for ConsumerOptiopns<'a>
impl<'a> RefUnwindSafe for ConsumerOptiopns<'a>
impl<'a> Send for ConsumerOptiopns<'a>
impl<'a> Sync for ConsumerOptiopns<'a>
impl<'a> Unpin for ConsumerOptiopns<'a>
impl<'a> UnwindSafe for ConsumerOptiopns<'a>
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