Interface AcknowledgeablePubsubMessage
- All Superinterfaces:
BasicAcknowledgeablePubsubMessage
- All Known Subinterfaces:
ConvertedAcknowledgeablePubsubMessage<T>
An extension of
BasicAcknowledgeablePubsubMessage
that exposes ack ID and subscription
name of the message. It also allows modification of the ack deadline and acknowledgement of
multiple messages at once using PubSubSubscriberOperations.ack(java.util.Collection)
.-
Method Summary
Modifier and TypeMethodDescriptiongetAckId()
Accessor for the ack ID of the Pub/Sub message.modifyAckDeadline
(int ackDeadlineSeconds) Modify the ack deadline of the message.Methods inherited from interface com.google.cloud.spring.pubsub.support.BasicAcknowledgeablePubsubMessage
ack, getProjectSubscriptionName, getPubsubMessage, nack
-
Method Details
-
getAckId
String getAckId()Accessor for the ack ID of the Pub/Sub message.- Returns:
- ack ID
-
modifyAckDeadline
Modify the ack deadline of the message. Once the ack deadline expires, the message is automatically nacked.- Parameters:
ackDeadlineSeconds
- the new ack deadline in seconds. A deadline of 0 effectively nacks the message.- Returns:
CompletableFuture<Void>
- Since:
- 1.1
-