Struct talos_certifier_adapters::kafka::consumer::KafkaConsumer
source · pub struct KafkaConsumer {
pub consumer: Arc<StreamConsumer<DefaultConsumerContext>>,
pub topic: String,
pub tpl: TopicPartitionList,
}
Fields§
§consumer: Arc<StreamConsumer<DefaultConsumerContext>>
§topic: String
§tpl: TopicPartitionList
Implementations§
source§impl KafkaConsumer
impl KafkaConsumer
pub fn new(config: &KafkaConfig) -> Self
pub fn store_offsets( &mut self, partition: i32, offset: i64 ) -> Result<(), KafkaAdapterError>
Trait Implementations§
source§impl MessageReciever for KafkaConsumer
impl MessageReciever for KafkaConsumer
type Message = ChannelMessage
fn consume_message<'life0, 'async_trait>(
&'life0 mut self
) -> Pin<Box<dyn Future<Output = Result<Option<Self::Message>, MessageReceiverError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), SystemServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unsubscribe<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), SystemServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn commit_async(&self) -> Option<JoinHandle<Result<(), SystemServiceError>>>
fn update_offset_to_commit( &mut self, offset: i64 ) -> Result<(), Box<SystemServiceError>>
fn update_savepoint_async<'life0, 'async_trait>(
&'life0 mut self,
_offset: i64
) -> Pin<Box<dyn Future<Output = Result<(), SystemServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_healthy<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn shutdown<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl !RefUnwindSafe for KafkaConsumer
impl Send for KafkaConsumer
impl Sync for KafkaConsumer
impl Unpin for KafkaConsumer
impl !UnwindSafe for KafkaConsumer
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