Struct hedwig::googlepubsub::ConsumerClient [−][src]
pub struct ConsumerClient<C = DefaultConnector> { /* fields omitted */ }
google
only.Expand description
A client through which PubSub consuming operations can be performed.
This includes managing subscriptions and reading data from subscriptions. Created using
build_consumer
Implementations
pub async fn create_subscription(
&mut self,
config: SubscriptionConfig<'_>
) -> Result<(), PubSubError>
pub async fn create_subscription(
&mut self,
config: SubscriptionConfig<'_>
) -> Result<(), PubSubError>
Create a new PubSub subscription
See the GCP documentation on subscriptions here
pub async fn delete_subscription(
&mut self,
subscription: SubscriptionName<'_>
) -> Result<(), PubSubError>
pub async fn delete_subscription(
&mut self,
subscription: SubscriptionName<'_>
) -> Result<(), PubSubError>
Delete an existing PubSub subscription.
See the GCP documentation on subscriptions here
pub fn stream_subscription(
&mut self,
subscription: SubscriptionName<'_>,
stream_config: StreamSubscriptionConfig
) -> PubSubStream<C>
pub fn stream_subscription(
&mut self,
subscription: SubscriptionName<'_>,
stream_config: StreamSubscriptionConfig
) -> PubSubStream<C>
Connect to PubSub and start streaming messages from the given subscription
pub async fn seek(
&mut self,
subscription: SubscriptionName<'_>,
timestamp: Timestamp
) -> Result<(), PubSubError>
pub async fn seek(
&mut self,
subscription: SubscriptionName<'_>,
timestamp: Timestamp
) -> Result<(), PubSubError>
Seeks messages from the given timestamp. It marks as acknowledged all the messages prior to the timestamp, and as not acknowledged the messages after the timestamp.
Trait Implementations
Auto Trait Implementations
impl<C = HttpsConnector<HttpConnector<GaiResolver>>> !RefUnwindSafe for ConsumerClient<C>
impl<C> Send for ConsumerClient<C> where
C: Send + Sync,
impl<C> Sync for ConsumerClient<C> where
C: Send + Sync,
impl<C> Unpin for ConsumerClient<C>
impl<C = HttpsConnector<HttpConnector<GaiResolver>>> !UnwindSafe for ConsumerClient<C>
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