Struct nakadion::publisher::Publisher [−][src]
pub struct Publisher<C> { /* fields omitted */ }
Expand description
Publishes events with retries
PublishApi
The publisher implements PublishApi
. If the trait method is used
for publishing no retries are done on partial successes. Retries are
only done on io errors and server errors or on auth errors if
retry_on_auth_errors
is set to true
.
Implementations
Creates a new Publisher
from the environment.
Environment variables must be prefixed with the given prefix
.
See PublisherConfig::from_env_prefixed
Creates a new Publisher
from the environment.
Environment variables must be prefixed “NAKADION”.
See PublisherConfig::from_env
Trait Implementations
fn publish_events_batch<'a, B: Into<Bytes>, T: Into<FlowId>>(
&'a self,
event_type: &'a EventTypeName,
events: B,
flow_id: T
) -> PublishFuture<'a>
fn publish_events_batch<'a, B: Into<Bytes>, T: Into<FlowId>>(
&'a self,
event_type: &'a EventTypeName,
events: B,
flow_id: T
) -> PublishFuture<'a>
Publishes a batch of Events of this EventType. All items must be of the EventType identified by name. Read more
impl<C> PublishesSerializedEvents for Publisher<C> where
C: PublishApi + Send + Sync + 'static,
impl<C> PublishesSerializedEvents for Publisher<C> where
C: PublishApi + Send + Sync + 'static,
fn publish_serialized_events<'a>(
&'a self,
event_type: &'a EventTypeName,
events: &[Bytes],
flow_id: FlowId
) -> PublishFuture<'a>
fn publish_serialized_events<'a>(
&'a self,
event_type: &'a EventTypeName,
events: &[Bytes],
flow_id: FlowId
) -> PublishFuture<'a>
Publishes the serialized events.
Auto Trait Implementations
impl<C> !RefUnwindSafe for Publisher<C>
impl<C> !UnwindSafe for Publisher<C>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more