/** * BLOCKING NACK (ie request deadline extension of 0) receipt of messages from Pubsub with the * given {@code ockIds}. Does not retain {@code ackIds}. */ public void nackBatch(long nowMsSinceEpoch, List<String> ackIds) throws IOException { pubsubClient.get().modifyAckDeadline(subscription, ackIds, 0); numNacked.add(nowMsSinceEpoch, ackIds.size()); }
/** * BLOCKING Extend the processing deadline for messages from Pubsub with the given {@code * ackIds}. Does not retain {@code ackIds}. */ private void extendBatch(long nowMsSinceEpoch, List<String> ackIds) throws IOException { int extensionSec = (ackTimeoutMs * ACK_EXTENSION_PCT) / (100 * 1000); pubsubClient.get().modifyAckDeadline(subscription, ackIds, extensionSec); numExtendedDeadlines.add(nowMsSinceEpoch, ackIds.size()); }