Struct rdkafka_wrap::KWConsumer
source · pub struct KWConsumer {
pub conf: KWConsumerConf,
pub consumer: Arc<StreamConsumer<DefaultConsumerContext>>,
pub admin_client: Mutex<Option<AdminClient<DefaultClientContext>>>,
}
Fields§
§conf: KWConsumerConf
§consumer: Arc<StreamConsumer<DefaultConsumerContext>>
§admin_client: Mutex<Option<AdminClient<DefaultClientContext>>>
Implementations§
source§impl KWConsumer
impl KWConsumer
pub fn new(conf: KWConsumerConf) -> KWResult<Self>
pub fn new_subscribe(conf: KWConsumerConf) -> KWResult<Self>
pub fn subscribe(&self) -> KWResult<()>
pub fn assign_split_partition_queue( &self, topic: &str, partition: i32 ) -> KWResult<Vec<StreamPartitionQueue<DefaultConsumerContext>>>
pub async fn recv<'a>(&self) -> Result<BorrowedMessage<'_>, KafkaError>
pub fn unsubscribe(&mut self)
pub fn assign(&self, topic_name: &str, partition: i32) -> KWResult<()>
pub fn split_partition_queue( &self, topic: &str, partition: i32 ) -> KWResult<StreamPartitionQueue<DefaultConsumerContext>>
pub fn store_offset( &self, topic: &str, partition: i32, offset: i64 ) -> KWResult<()>
pub fn fetch_group_list(&self) -> KWResult<GroupList>
Trait Implementations§
source§impl OptionExt for KWConsumer
impl OptionExt for KWConsumer
type AdminClient = AdminClient<DefaultClientContext>
fn create_topic<'a, 'life0, 'async_trait, I>( &'life0 self, topics: I ) -> Pin<Box<dyn Future<Output = KWResult<()>> + Send + 'async_trait>>where I: IntoIterator<Item = &'a NewTopic<'a>> + Send + 'async_trait, Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,
fn get_brokers(&self) -> &str
fn get_log_level(&self) -> RDKafkaLogLevel
fn create_admin_client(&self) -> KWResult<Self::AdminClient>
Auto Trait Implementations§
impl !RefUnwindSafe for KWConsumer
impl Send for KWConsumer
impl Sync for KWConsumer
impl Unpin for KWConsumer
impl !UnwindSafe for KWConsumer
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