Interface SequencedPublisher<ResponseT>
-
- All Superinterfaces:
com.google.api.core.ApiService
,Flushable
- All Known Implementing Classes:
PublisherImpl
public interface SequencedPublisher<ResponseT> extends com.google.api.core.ApiService, Flushable
A PubSub Lite publisher that requires a sequence number assigned to every message, for publish idempotency. Errors are handled out of band. Thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cancelOutstandingPublishes()
Attempts 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.
-
-
-
Method Detail
-
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.
-
-