Struct hedwig::googlepubsub::Publisher [−][src]
pub struct Publisher<C, R = ExponentialBackoff<StatusCodeSet>> { /* fields omitted */ }
This is supported on crate feature
google
only.Expand description
A publisher for sending messages to PubSub topics
Implementations
pub fn with_retry_policy<R, M>(self, retry_policy: R) -> Publisher<C, R> where
R: RetryPolicy<[M], PubSubError> + Clone,
M: EncodableMessage,
pub fn with_retry_policy<R, M>(self, retry_policy: R) -> Publisher<C, R> where
R: RetryPolicy<[M], PubSubError> + Clone,
M: EncodableMessage,
Set the retry policy for this Publisher
.
If a publishing operation encounters an error, the given retry policy will be consulted to possibly retry the operation, or otherwise propagate the error to the caller.
Trait Implementations
impl<C, M, S, R> Publisher<M, S> for Publisher<C, R> where
C: Connect + Clone + Send + Sync + 'static,
M: EncodableMessage + Send + 'static,
S: Sink<M> + Send + 'static,
R: RetryPolicy<[M], PubSubError> + Clone + 'static,
R::RetryOp: Send + 'static,
<R::RetryOp as RetryOperation<[M], PubSubError>>::Sleep: Send + 'static,
impl<C, M, S, R> Publisher<M, S> for Publisher<C, R> where
C: Connect + Clone + Send + Sync + 'static,
M: EncodableMessage + Send + 'static,
S: Sink<M> + Send + 'static,
R: RetryPolicy<[M], PubSubError> + Clone + 'static,
R::RetryOp: Send + 'static,
<R::RetryOp as RetryOperation<[M], PubSubError>>::Sleep: Send + 'static,
type PublishError = PublishError<M, S::Error>
type PublishError = PublishError<M, S::Error>
The error type that may be encountered when publishing a message
type PublishSink = PublishSink<C, M, S, R>
type PublishSink = PublishSink<C, M, S, R>
fn publish_sink_with_responses(
self,
validator: M::Validator,
response_sink: S
) -> Self::PublishSink
fn publish_sink_with_responses(
self,
validator: M::Validator,
response_sink: S
) -> Self::PublishSink
Create a new sink to accept messages. Read more
fn publish_sink(self, validator: M::Validator) -> Self::PublishSink where
Self: Sized,
S: Default,
fn publish_sink(self, validator: M::Validator) -> Self::PublishSink where
Self: Sized,
S: Default,
Create a new sink to accept messages. Read more
Auto Trait Implementations
impl<C, R = ExponentialBackoff<StatusCodeSet, TokioSleeper>> !RefUnwindSafe for Publisher<C, R>
impl<C, R = ExponentialBackoff<StatusCodeSet, TokioSleeper>> !UnwindSafe for Publisher<C, R>
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
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