Struct hedwig::publish::PublishBatch [−][src]
pub struct PublishBatch { /* fields omitted */ }
publish
only.Expand description
A convenience builder for publishing in batches.
Implementations
Add an already validated message to be published in this batch.
Validate and add a message to be published in this batch.
pub fn publish<P>(self, publisher: &P) -> PublishBatchStream<P::PublishStream> where
P: Publisher,
P::PublishStream: Unpin,
pub fn publish<P>(self, publisher: &P) -> PublishBatchStream<P::PublishStream> where
P: Publisher,
P::PublishStream: Unpin,
Publish all the enqueued messages, batching them for high efficiency.
The order in which messages were added to the batch and the order of messages as seen by the publisher is not strictly preserved. As thus, the output stream will not preserve the message ordering either.
Some kinds of errors that occur during publishing may not be transient. An example of such
an error is attempting to publish a too large message with the GooglePubSubPublisher
.
For
errors like these retrying is most likely incorrect as they would just fail again.
Publisher-specific error types may have methods to make a decision easier.
Trait Implementations
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for PublishBatch
impl Send for PublishBatch
impl Sync for PublishBatch
impl Unpin for PublishBatch
impl UnwindSafe for PublishBatch
Blanket Implementations
Mutably borrows from an owned value. Read more
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