use of com.google.pubsub.v1.Subscription in project beam by apache.
the class PubsubGrpcClient method acknowledge.
@Override
public void acknowledge(SubscriptionPath subscription, List<String> ackIds) throws IOException {
AcknowledgeRequest request = AcknowledgeRequest.newBuilder().setSubscription(subscription.getPath()).addAllAckIds(ackIds).build();
// ignore Empty result.
subscriberStub().acknowledge(request);
}
use of com.google.pubsub.v1.Subscription in project beam by apache.
the class PubsubGrpcClient method ackDeadlineSeconds.
@Override
public int ackDeadlineSeconds(SubscriptionPath subscription) throws IOException {
GetSubscriptionRequest request = GetSubscriptionRequest.newBuilder().setSubscription(subscription.getPath()).build();
Subscription response = subscriberStub().getSubscription(request);
return response.getAckDeadlineSeconds();
}
Aggregations