public interface PubSubPublisherOperations
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.
|
<T> org.springframework.util.concurrent.ListenableFuture<String> publish(String topic, T payload, Map<String,String> headers)
T
- the type of the payload to publishtopic
- canonical topic name, e.g., "topicName", or the fully-qualified topic name in the
projects/<project_name>/topics/<topic_name>
formatpayload
- an object that will be serialized and sentheaders
- the headers to publish<T> org.springframework.util.concurrent.ListenableFuture<String> publish(String topic, T payload)
T
- the type of the payload to publishtopic
- canonical topic name, e.g., "topicName", or the fully-qualified topic name in the
projects/<project_name>/topics/<topic_name>
formatpayload
- an object that will be serialized and sentorg.springframework.util.concurrent.ListenableFuture<String> publish(String topic, com.google.pubsub.v1.PubsubMessage pubsubMessage)
topic
- canonical topic name, e.g., "topicName", or the fully-qualified topic name in the
projects/<project_name>/topics/<topic_name>
formatpubsubMessage
- a Google Cloud Pub/Sub API messageCopyright © 2021. All rights reserved.