Class StreamingPullRequest (1.130.0)

public final class StreamingPullRequest extends GeneratedMessageV3 implements StreamingPullRequestOrBuilder

Request for the StreamingPull streaming RPC method. This request is used to establish the initial stream as well as to stream acknowledgements and ack deadline modifications from the client to the server.

Protobuf type google.pubsub.v1.StreamingPullRequest

Static Fields

ACK_IDS_FIELD_NUMBER

public static final int ACK_IDS_FIELD_NUMBER
Field Value
Type Description
int

CLIENT_ID_FIELD_NUMBER

public static final int CLIENT_ID_FIELD_NUMBER
Field Value
Type Description
int

MAX_OUTSTANDING_BYTES_FIELD_NUMBER

public static final int MAX_OUTSTANDING_BYTES_FIELD_NUMBER
Field Value
Type Description
int

MAX_OUTSTANDING_MESSAGES_FIELD_NUMBER

public static final int MAX_OUTSTANDING_MESSAGES_FIELD_NUMBER
Field Value
Type Description
int

MODIFY_DEADLINE_ACK_IDS_FIELD_NUMBER

public static final int MODIFY_DEADLINE_ACK_IDS_FIELD_NUMBER
Field Value
Type Description
int

MODIFY_DEADLINE_SECONDS_FIELD_NUMBER

public static final int MODIFY_DEADLINE_SECONDS_FIELD_NUMBER
Field Value
Type Description
int

STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER

public static final int STREAM_ACK_DEADLINE_SECONDS_FIELD_NUMBER
Field Value
Type Description
int

SUBSCRIPTION_FIELD_NUMBER

public static final int SUBSCRIPTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StreamingPullRequest getDefaultInstance()
Returns
Type Description
StreamingPullRequest

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static StreamingPullRequest.Builder newBuilder()
Returns
Type Description
StreamingPullRequest.Builder

newBuilder(StreamingPullRequest prototype)

public static StreamingPullRequest.Builder newBuilder(StreamingPullRequest prototype)
Parameter
Name Description
prototype StreamingPullRequest
Returns
Type Description
StreamingPullRequest.Builder

parseDelimitedFrom(InputStream input)

public static StreamingPullRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StreamingPullRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingPullRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingPullRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StreamingPullRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StreamingPullRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingPullRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StreamingPullRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StreamingPullRequest> parser()
Returns
Type Description
Parser<StreamingPullRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAckIds(int index)

public String getAckIds(int index)

Optional. List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The ackIds at the given index.

getAckIdsBytes(int index)

public ByteString getAckIdsBytes(int index)

Optional. List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the ackIds at the given index.

getAckIdsCount()

public int getAckIdsCount()

Optional. List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of ackIds.

getAckIdsList()

public ProtocolStringList getAckIdsList()

Optional. List of acknowledgement IDs for acknowledging previously received messages (received on this stream or a different stream). If an ack ID has expired, the corresponding message may be redelivered later. Acknowledging a message more than once will not result in an error. If the acknowledgement ID is malformed, the stream will be aborted with status INVALID_ARGUMENT.

repeated string ack_ids = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the ackIds.

getClientId()

public String getClientId()

Optional. A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The clientId.

getClientIdBytes()

public ByteString getClientIdBytes()

Optional. A unique identifier that is used to distinguish client instances from each other. Only needs to be provided on the initial request. When a stream disconnects and reconnects for the same stream, the client_id should be set to the same value so that state associated with the old stream can be transferred to the new stream. The same client_id should not be used for different client instances.

string client_id = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for clientId.

getDefaultInstanceForType()

public StreamingPullRequest getDefaultInstanceForType()
Returns
Type Description
StreamingPullRequest

getMaxOutstandingBytes()

public long getMaxOutstandingBytes()

Optional. Flow control settings for the maximum number of outstanding bytes. When there are max_outstanding_bytes or more worth of messages currently sent to the streaming pull client that have not yet been acked or nacked, the server will stop sending more messages. The sending of messages resumes once the number of outstanding bytes is less than this value. If the value is <= 0, there is no limit to the number of outstanding bytes. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_bytes = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The maxOutstandingBytes.

getMaxOutstandingMessages()

public long getMaxOutstandingMessages()

Optional. Flow control settings for the maximum number of outstanding messages. When there are max_outstanding_messages currently sent to the streaming pull client that have not yet been acked or nacked, the server stops sending more messages. The sending of messages resumes once the number of outstanding messages is less than this value. If the value is <= 0, there is no limit to the number of outstanding messages. This property can only be set on the initial StreamingPullRequest. If it is set on a subsequent request, the stream will be aborted with status INVALID_ARGUMENT.

int64 max_outstanding_messages = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
long

The maxOutstandingMessages.

getModifyDeadlineAckIds(int index)

public String getModifyDeadlineAckIds(int index)

Optional. List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The modifyDeadlineAckIds at the given index.

getModifyDeadlineAckIdsBytes(int index)

public ByteString getModifyDeadlineAckIdsBytes(int index)

Optional. List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the modifyDeadlineAckIds at the given index.

getModifyDeadlineAckIdsCount()

public int getModifyDeadlineAckIdsCount()

Optional. List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of modifyDeadlineAckIds.

getModifyDeadlineAckIdsList()

public ProtocolStringList getModifyDeadlineAckIdsList()

Optional. List of acknowledgement IDs whose deadline will be modified based on the corresponding element in modify_deadline_seconds. This field can be used to indicate that more time is needed to process a message by the subscriber, or to make the message available for redelivery if the processing was interrupted.

repeated string modify_deadline_ack_ids = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ProtocolStringList

A list containing the modifyDeadlineAckIds.

getModifyDeadlineSeconds(int index)

public int getModifyDeadlineSeconds(int index)

Optional. The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
int

The modifyDeadlineSeconds at the given index.

getModifyDeadlineSecondsCount()

public int getModifyDeadlineSecondsCount()

Optional. The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The count of modifyDeadlineSeconds.

getModifyDeadlineSecondsList()

public List<Integer> getModifyDeadlineSecondsList()

Optional. The list of new ack deadlines for the IDs listed in modify_deadline_ack_ids. The size of this list must be the same as the size of modify_deadline_ack_ids. If it differs the stream will be aborted with INVALID_ARGUMENT. Each element in this list is applied to the element in the same position in modify_deadline_ack_ids. The new ack deadline is with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after this request is received. If the value is 0, the message is immediately made available for another streaming or non-streaming pull request. If the value is < 0 (an error), the stream will be aborted with status INVALID_ARGUMENT.

repeated int32 modify_deadline_seconds = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Integer>

A list containing the modifyDeadlineSeconds.

getParserForType()

public Parser<StreamingPullRequest> getParserForType()
Returns
Type Description
Parser<StreamingPullRequest>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getStreamAckDeadlineSeconds()

public int getStreamAckDeadlineSeconds()

Required. The ack deadline to use for the stream. This must be provided in the first request on the stream, but it can also be updated on subsequent requests from client to server. The minimum deadline you can specify is 10 seconds. The maximum deadline you can specify is 600 seconds (10 minutes).

int32 stream_ack_deadline_seconds = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The streamAckDeadlineSeconds.

getSubscription()

public String getSubscription()

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The subscription.

getSubscriptionBytes()

public ByteString getSubscriptionBytes()

Required. The subscription for which to initialize the new stream. This must be provided in the first request on the stream, and must not be set in subsequent requests from client to server. Format is projects/{project}/subscriptions/{sub}.

string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for subscription.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public StreamingPullRequest.Builder newBuilderForType()
Returns
Type Description
StreamingPullRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StreamingPullRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
StreamingPullRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public StreamingPullRequest.Builder toBuilder()
Returns
Type Description
StreamingPullRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException