void acknowledge(List<String> ackIdList) { AcknowledgeRequest ackRequest = new AcknowledgeRequest() .setAckIds(ackIdList); try { endpoint.getPubsub() .projects() .subscriptions() .acknowledge(subscriptionFullName, ackRequest) .execute(); } catch (Exception e) { throw new RuntimeException(e); } }
@Override public void acknowledge(SubscriptionPath subscription, List<String> ackIds) throws IOException { AcknowledgeRequest request = new AcknowledgeRequest().setAckIds(ackIds); pubsub .projects() .subscriptions() .acknowledge(subscription.getPath(), request) .execute(); // ignore Empty result. }
public void ack(String subscription, List<String> ackIds) throws IOException { client.projects().subscriptions() .acknowledge(getSubscriptionPath(subscription), new AcknowledgeRequest().setAckIds(ackIds)).execute(); }
ackRequest.setAckIds(ackIds); client.projects().subscriptions() .acknowledge(subscriptionName, ackRequest)