Interface SequencedPublisher<ResponseT>
- All Superinterfaces:
com.google.api.core.ApiService,Flushable
- All Known Implementing Classes:
PublisherImpl
A PubSub Lite publisher that requires a sequence number assigned to every message, for publish
idempotency. Errors are handled out of band. Thread safe.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.google.api.core.ApiService
com.google.api.core.ApiService.Listener, com.google.api.core.ApiService.State -
Method Summary
Modifier and TypeMethodDescriptionvoidAttempts to cancel all outstanding publishes.com.google.api.core.ApiFuture<ResponseT>publish(PubSubMessage message, PublishSequenceNumber sequenceNumber) Publish a new message with an assigned sequence number.Methods inherited from interface com.google.api.core.ApiService
addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, startAsync, state, stopAsync
-
Method Details
-
publish
com.google.api.core.ApiFuture<ResponseT> publish(PubSubMessage message, PublishSequenceNumber sequenceNumber) Publish a new message with an assigned sequence number.Behavior is undefined if a call to flush() is outstanding or close() has already been called. This method never blocks.
Guarantees that if a single publish future has an exception set, all publish calls made after that will also have an exception set.
-
cancelOutstandingPublishes
void cancelOutstandingPublishes()Attempts to cancel all outstanding publishes.
-