Class CloudPubSubRoundRobinSubscriber (1.0.0)

public class CloudPubSubRoundRobinSubscriber implements CloudPubSubSubscriber

A CloudPubSubSubscriber that distributes a single subscription in round-robin fashion over a set of CloudPubSubGRPCSubscribers.

Inheritance

java.lang.Object > CloudPubSubRoundRobinSubscriber

Constructors

CloudPubSubRoundRobinSubscriber(int subscriberCount, CredentialsProvider gcpCredentialsProvider, String endpoint, ProjectSubscriptionName subscriptionName, int cpsMaxBatchSize)

public CloudPubSubRoundRobinSubscriber(int subscriberCount, CredentialsProvider gcpCredentialsProvider, String endpoint, ProjectSubscriptionName subscriptionName, int cpsMaxBatchSize)
Parameters
NameDescription
subscriberCountint
gcpCredentialsProviderCredentialsProvider
endpointString
subscriptionNamecom.google.pubsub.v1.ProjectSubscriptionName
cpsMaxBatchSizeint

Methods

ackMessages(Collection<String> ackIds)

public ApiFuture<Empty> ackMessages(Collection<String> ackIds)
Parameter
NameDescription
ackIdsCollection<String>
Returns
TypeDescription
ApiFuture<Empty>

close()

public void close()

pull()

public ApiFuture<List<ReceivedMessage>> pull()
Returns
TypeDescription
ApiFuture<List<com.google.pubsub.v1.ReceivedMessage>>