Interface AcknowledgeablePubsubMessage

All Superinterfaces:
BasicAcknowledgeablePubsubMessage
All Known Subinterfaces:
ConvertedAcknowledgeablePubsubMessage<T>

public interface AcknowledgeablePubsubMessage extends BasicAcknowledgeablePubsubMessage
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 Details

    • getAckId

      String getAckId()
      Accessor for the ack ID of the Pub/Sub message.
      Returns:
      ack ID
    • modifyAckDeadline

      CompletableFuture<Void> modifyAckDeadline(int ackDeadlineSeconds)
      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