Struct hedwig::publish::PublishBatch[][src]

pub struct PublishBatch { /* fields omitted */ }
This is supported on crate feature publish only.
Expand description

A convenience builder for publishing in batches.

Implementations

Construct a new batch.

Number of messages currently queued.

Whether the batch is empty.

Add an already validated message to be published in this batch.

Validate and add a message to be published in this batch.

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

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

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