public static interface Publisher.Listener
Publisher.| Modifier and Type | Method and Description |
|---|---|
void |
publisherClosed(Publisher publisher)
Called when a
Publisher is closed. |
void |
publisherCreated(Publisher publisher)
Called when a new
Publisher is instantiated. |
void |
publishingMessage(Publisher publisher,
String topic,
Message message,
CompletableFuture<String> future)
Called when a
Publisher receieves a new message for publication. |
void |
sendingBatch(Publisher publisher,
String topic,
List<Message> batch,
CompletableFuture<List<String>> future)
Deprecated.
|
default void |
sendingBatch(Publisher publisher,
String topic,
List<Message> batch,
PubsubFuture<List<String>> future)
Called when a
Publisher is sending a batch of messages to Google Cloud Pub/Sub. |
void |
topicPending(Publisher publisher,
String topic,
int outstanding,
int concurrency)
Called when a topic is enqueued as pending for future batch sending due to the publisher hitting the concurrency
limit.
|
void publisherCreated(Publisher publisher)
Publisher is instantiated.publisher - The Publishervoid publisherClosed(Publisher publisher)
Publisher is closed.publisher - The Publishervoid publishingMessage(Publisher publisher, String topic, Message message, CompletableFuture<String> future)
Publisher receieves a new message for publication.publisher - The Publishertopic - The message topic.message - The message.future - The future result.@Deprecated void sendingBatch(Publisher publisher, String topic, List<Message> batch, CompletableFuture<List<String>> future)
Publisher is sending a batch of messages to Google Cloud Pub/Sub.publisher - The Publishertopic - The topic of the message batch.batch - The batch of messages being sent.future - The future result of the entire batch.default void sendingBatch(Publisher publisher, String topic, List<Message> batch, PubsubFuture<List<String>> future)
Publisher is sending a batch of messages to Google Cloud Pub/Sub.publisher - The Publishertopic - The topic of the message batch.batch - The batch of messages being sent.future - The future result of the entire batch.void topicPending(Publisher publisher, String topic, int outstanding, int concurrency)
publisher - The Publishertopic - The topic.outstanding - The current number of outstanding batch requests to Google Cloud Pub/Sub.concurrency - The configured concurrency limit.Copyright © 2018. All rights reserved.