Struct google_api_proto::google::pubsub::v1::StreamingPullRequest
source · pub struct StreamingPullRequest {
pub subscription: String,
pub ack_ids: Vec<String>,
pub modify_deadline_seconds: Vec<i32>,
pub modify_deadline_ack_ids: Vec<String>,
pub stream_ack_deadline_seconds: i32,
pub client_id: String,
pub max_outstanding_messages: i64,
pub max_outstanding_bytes: i64,
}
Expand description
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.
Fields§
§subscription: String
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}
.
ack_ids: Vec<String>
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
.
modify_deadline_seconds: Vec<i32>
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
.
modify_deadline_ack_ids: Vec<String>
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.
stream_ack_deadline_seconds: i32
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).
client_id: String
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.
max_outstanding_messages: i64
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
.
max_outstanding_bytes: i64
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
.
Trait Implementations§
source§impl Clone for StreamingPullRequest
impl Clone for StreamingPullRequest
source§fn clone(&self) -> StreamingPullRequest
fn clone(&self) -> StreamingPullRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StreamingPullRequest
impl Debug for StreamingPullRequest
source§impl Default for StreamingPullRequest
impl Default for StreamingPullRequest
source§impl Message for StreamingPullRequest
impl Message for StreamingPullRequest
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for StreamingPullRequest
impl PartialEq for StreamingPullRequest
source§fn eq(&self, other: &StreamingPullRequest) -> bool
fn eq(&self, other: &StreamingPullRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StreamingPullRequest
Auto Trait Implementations§
impl Freeze for StreamingPullRequest
impl RefUnwindSafe for StreamingPullRequest
impl Send for StreamingPullRequest
impl Sync for StreamingPullRequest
impl Unpin for StreamingPullRequest
impl UnwindSafe for StreamingPullRequest
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request