Struct google_api_proto::google::pubsub::v1::PubsubMessage
source · pub struct PubsubMessage {
pub data: Bytes,
pub attributes: BTreeMap<String, String>,
pub message_id: String,
pub publish_time: Option<Timestamp>,
pub ordering_key: String,
}
Expand description
A message that is published by publishers and consumed by subscribers. The message must contain either a non-empty data field or at least one attribute. Note that client libraries represent this object differently depending on the language. See the corresponding client library documentation for more information. See [quotas and limits] (https://cloud.google.com/pubsub/quotas) for more information about message limits.
Fields§
§data: Bytes
Optional. The message data field. If this field is empty, the message must contain at least one attribute.
attributes: BTreeMap<String, String>
Optional. Attributes for this message. If this field is empty, the message must contain non-empty data. This can be used to filter messages on the subscription.
message_id: String
ID of this message, assigned by the server when the message is published.
Guaranteed to be unique within the topic. This value may be read by a
subscriber that receives a PubsubMessage
via a Pull
call or a push
delivery. It must not be populated by the publisher in a Publish
call.
publish_time: Option<Timestamp>
The time at which the message was published, populated by the server when
it receives the Publish
call. It must not be populated by the
publisher in a Publish
call.
ordering_key: String
Optional. If non-empty, identifies related messages for which publish order
should be respected. If a Subscription
has enable_message_ordering
set
to true
, messages published with the same non-empty ordering_key
value
will be delivered to subscribers in the order in which they are received by
the Pub/Sub system. All PubsubMessage
s published in a given
PublishRequest
must specify the same ordering_key
value. For more
information, see ordering
messages.
Trait Implementations§
source§impl Clone for PubsubMessage
impl Clone for PubsubMessage
source§fn clone(&self) -> PubsubMessage
fn clone(&self) -> PubsubMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PubsubMessage
impl Debug for PubsubMessage
source§impl Default for PubsubMessage
impl Default for PubsubMessage
source§impl Message for PubsubMessage
impl Message for PubsubMessage
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 PubsubMessage
impl PartialEq for PubsubMessage
source§fn eq(&self, other: &PubsubMessage) -> bool
fn eq(&self, other: &PubsubMessage) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for PubsubMessage
Auto Trait Implementations§
impl !Freeze for PubsubMessage
impl RefUnwindSafe for PubsubMessage
impl Send for PubsubMessage
impl Sync for PubsubMessage
impl Unpin for PubsubMessage
impl UnwindSafe for PubsubMessage
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