public interface PubSubOperations
| Modifier and Type | Method and Description |
|---|---|
org.springframework.util.concurrent.ListenableFuture<String> |
publish(String topic,
com.google.pubsub.v1.PubsubMessage pubsubMessage)
Send a message to Pub/Sub.
|
<T> org.springframework.util.concurrent.ListenableFuture<String> |
publish(String topic,
T payload)
Send a message to Pub/Sub.
|
<T> org.springframework.util.concurrent.ListenableFuture<String> |
publish(String topic,
T payload,
Map<String,String> headers)
Send a message to Pub/Sub.
|
List<AcknowledgeablePubsubMessage> |
pull(String subscription,
Integer maxMessages,
Boolean returnImmediately)
Pull a number of messages from a Google Cloud Pub/Sub subscription.
|
List<com.google.pubsub.v1.PubsubMessage> |
pullAndAck(String subscription,
Integer maxMessages,
Boolean returnImmediately)
Pull and auto-acknowledge a number of messages from a Google Cloud Pub/Sub subscription.
|
com.google.pubsub.v1.PubsubMessage |
pullNext(String subscription)
Pull and auto-acknowledge a message from a Google Cloud Pub/Sub subscription.
|
com.google.cloud.pubsub.v1.Subscriber |
subscribe(String subscription,
com.google.cloud.pubsub.v1.MessageReceiver messageHandler)
Add a callback method to an existing subscription.
|
<T> org.springframework.util.concurrent.ListenableFuture<String> publish(String topic, T payload, Map<String,String> headers)
topic - the name of an existing topicpayload - an object that will be serialized and sent<T> org.springframework.util.concurrent.ListenableFuture<String> publish(String topic, T payload)
topic - the name of an existing topicpayload - an object that will be serialized and sentorg.springframework.util.concurrent.ListenableFuture<String> publish(String topic, com.google.pubsub.v1.PubsubMessage pubsubMessage)
topic - the name of an existing topicpubsubMessage - a Google Cloud Pub/Sub API messagecom.google.cloud.pubsub.v1.Subscriber subscribe(String subscription, com.google.cloud.pubsub.v1.MessageReceiver messageHandler)
The created Subscriber is returned so it can be stopped.
subscription - the name of an existing subscriptionmessageHandler - the callback method triggered when new messages arriveList<com.google.pubsub.v1.PubsubMessage> pullAndAck(String subscription, Integer maxMessages, Boolean returnImmediately)
subscription - the subscription namemaxMessages - the maximum number of pulled messagesreturnImmediately - returns immediately even if subscription doesn't contain enough
messages to satisfy maxMessagesList<AcknowledgeablePubsubMessage> pull(String subscription, Integer maxMessages, Boolean returnImmediately)
subscription - the subscription namemaxMessages - the maximum number of pulled messagesreturnImmediately - returns immediately even if subscription doesn't contain enough
messages to satisfy maxMessagescom.google.pubsub.v1.PubsubMessage pullNext(String subscription)
subscription - the subscription namenull if none exists in the subscriptionCopyright © 2018 Pivotal Software, Inc.. All rights reserved.