Class SubscriberGrpc.SubscriberBlockingStub (1.127.3)

public static final class SubscriberGrpc.SubscriberBlockingStub extends AbstractBlockingStub<SubscriberGrpc.SubscriberBlockingStub>

A stub to allow clients to do synchronous rpc calls to service Subscriber.

The service that an application uses to manipulate subscriptions and to consume messages from a subscription via the Pull method or by establishing a bi-directional stream using the StreamingPull method.

Inheritance

java.lang.Object > io.grpc.stub.AbstractStub > io.grpc.stub.AbstractBlockingStub > SubscriberGrpc.SubscriberBlockingStub

Methods

acknowledge(AcknowledgeRequest request)

public Empty acknowledge(AcknowledgeRequest request)

Acknowledges the messages associated with the ack_ids in the AcknowledgeRequest. The Pub/Sub system can remove the relevant messages from the subscription. Acknowledging a message whose ack deadline has expired may succeed, but such a message may be redelivered later. Acknowledging a message more than once will not result in an error.

Parameter
Name Description
request AcknowledgeRequest
Returns
Type Description
Empty

build(Channel channel, CallOptions callOptions)

protected SubscriberGrpc.SubscriberBlockingStub build(Channel channel, CallOptions callOptions)
Parameters
Name Description
channel io.grpc.Channel
callOptions io.grpc.CallOptions
Returns
Type Description
SubscriberGrpc.SubscriberBlockingStub
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)

createSnapshot(CreateSnapshotRequest request)

public Snapshot createSnapshot(CreateSnapshotRequest request)

Creates a snapshot from the requested subscription. Snapshots are used in Seek operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot. If the snapshot already exists, returns ALREADY_EXISTS. If the requested subscription doesn't exist, returns NOT_FOUND. If the backlog in the subscription is too old -- and the resulting snapshot would expire in less than 1 hour -- then FAILED_PRECONDITION is returned. See also the Snapshot.expire_time field. If the name is not provided in the request, the server will assign a random name for this snapshot on the same project as the subscription, conforming to the resource name format. The generated name is populated in the returned Snapshot object. Note that for REST API requests, you must specify a name in the request.

Parameter
Name Description
request CreateSnapshotRequest
Returns
Type Description
Snapshot

createSubscription(Subscription request)

public Subscription createSubscription(Subscription request)

Creates a subscription to a given topic. See the resource name rules. If the subscription already exists, returns ALREADY_EXISTS. If the corresponding topic doesn't exist, returns NOT_FOUND. If the name is not provided in the request, the server will assign a random name for this subscription on the same project as the topic, conforming to the resource name format. The generated name is populated in the returned Subscription object. Note that for REST API requests, you must specify a name in the request.

Parameter
Name Description
request