public interface SubscriberFactory
PubSubTemplate to create supporting
objects for consuming messages from Pub/Sub subscriptions.| Modifier and Type | Method and Description |
|---|---|
com.google.pubsub.v1.PullRequest |
createPullRequest(String subscriptionName,
Integer maxMessages,
Boolean returnImmediately)
Create a
PullRequest for synchronously pulling a number of messages from
a Google Cloud Pub/Sub subscription. |
com.google.cloud.pubsub.v1.Subscriber |
createSubscriber(String subscriptionName,
com.google.cloud.pubsub.v1.MessageReceiver receiver)
Create a
Subscriber for the specified subscription name and wired it up to asynchronously
deliver messages to the provided MessageReceiver. |
com.google.cloud.pubsub.v1.stub.SubscriberStub |
createSubscriberStub(com.google.api.gax.retrying.RetrySettings retrySettings)
Create a
SubscriberStub that is needed to execute PullRequests. |
com.google.cloud.pubsub.v1.Subscriber createSubscriber(String subscriptionName, com.google.cloud.pubsub.v1.MessageReceiver receiver)
Subscriber for the specified subscription name and wired it up to asynchronously
deliver messages to the provided MessageReceiver.subscriptionName - the name of the subscriptionreceiver - the callback for receiving messages asynchronouslySubscriber that was created to bind the receiver to the subscriptioncom.google.pubsub.v1.PullRequest createPullRequest(String subscriptionName, Integer maxMessages, Boolean returnImmediately)
PullRequest for synchronously pulling a number of messages from
a Google Cloud Pub/Sub subscription.subscriptionName - the name of the subscriptionmaxMessages - the maximum number of pulled messagesreturnImmediately - causes the pull request to return immediately even
if subscription doesn't contain enough messages to satisfy maxMessagesSubscriberStubcom.google.cloud.pubsub.v1.stub.SubscriberStub createSubscriberStub(com.google.api.gax.retrying.RetrySettings retrySettings)
SubscriberStub that is needed to execute PullRequests.retrySettings - parameters for retrying pull requests when they fail, including
jitter logic, timeout, and exponential backoffSubscriberStub used for executing PullRequestsCopyright © 2018 Pivotal Software, Inc.. All rights reserved.