public class BlockingGrpcPubSubSubscriber extends Object implements PubSubSubscriber
PubSubSubscriber
. This Grpc PubSubSubscriber allows for flexible
timeouts and retries.Constructor and Description |
---|
BlockingGrpcPubSubSubscriber(String projectSubscriptionName,
io.grpc.ManagedChannel channel,
com.google.pubsub.v1.SubscriberGrpc.SubscriberBlockingStub stub,
com.google.pubsub.v1.PullRequest pullRequest,
int retries,
java.time.Duration timeout) |
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(List<String> acknowledgementIds) |
void |
close()
After returning all resources should have been cleaned up.
|
List<com.google.pubsub.v1.ReceivedMessage> |
pull() |
public BlockingGrpcPubSubSubscriber(String projectSubscriptionName, io.grpc.ManagedChannel channel, com.google.pubsub.v1.SubscriberGrpc.SubscriberBlockingStub stub, com.google.pubsub.v1.PullRequest pullRequest, int retries, java.time.Duration timeout)
public List<com.google.pubsub.v1.ReceivedMessage> pull()
pull
in interface PubSubSubscriber
public void acknowledge(List<String> acknowledgementIds)
acknowledge
in interface Acknowledger<String>
public void close() throws Exception
PubSubSubscriber
close
in interface PubSubSubscriber
Exception
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.