pub struct KafkaBus { /* private fields */ }Expand description
Kafka/Redpanda bus.
Implementations§
Trait Implementations§
Source§impl EventBus for KafkaBus
impl EventBus for KafkaBus
Source§fn set_control_key(&self, key: [u8; 32]) -> Result<(), BusError>
fn set_control_key(&self, key: [u8; 32]) -> Result<(), BusError>
Configure the signer-derived key used for authenticated local controls.
Source§fn publish(
&self,
topic: &str,
key: &str,
value: &Value,
) -> Result<PublishAck, BusError>
fn publish( &self, topic: &str, key: &str, value: &Value, ) -> Result<PublishAck, BusError>
Publish
value onto topic, partitioned by key. Returns the ack.Source§fn publish_idempotent(
&self,
topic: &str,
key: &str,
value: &Value,
event_uid: &str,
) -> Result<PublishAck, BusError>
fn publish_idempotent( &self, topic: &str, key: &str, value: &Value, event_uid: &str, ) -> Result<PublishAck, BusError>
Publish a stable event UID. Backends with native or local deduplication
override this method; the default preserves compatibility while the UID
remains embedded in the event payload for downstream deduplication.
Source§fn find_event_by_uid(
&self,
topic: &str,
key: &str,
event_uid: &str,
) -> Result<Option<PublishAck>, BusError>
fn find_event_by_uid( &self, topic: &str, key: &str, event_uid: &str, ) -> Result<Option<PublishAck>, BusError>
Locate an already committed event by stable UID during crash recovery.
Source§fn fetch(
&self,
topic: &str,
partition: u32,
offset: u64,
max: usize,
) -> Result<Vec<StoredEvent>, BusError>
fn fetch( &self, topic: &str, partition: u32, offset: u64, max: usize, ) -> Result<Vec<StoredEvent>, BusError>
Read up to
max events from topic/partition starting at offset
(ordered replay).Auto Trait Implementations§
impl !Freeze for KafkaBus
impl !RefUnwindSafe for KafkaBus
impl Send for KafkaBus
impl Sync for KafkaBus
impl Unpin for KafkaBus
impl UnsafeUnpin for KafkaBus
impl !UnwindSafe for KafkaBus
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more