Struct pulsar::message::proto::MessageMetadata
source · pub struct MessageMetadata {Show 28 fields
pub producer_name: String,
pub sequence_id: u64,
pub publish_time: u64,
pub properties: Vec<KeyValue>,
pub replicated_from: Option<String>,
pub partition_key: Option<String>,
pub replicate_to: Vec<String>,
pub compression: Option<i32>,
pub uncompressed_size: Option<u32>,
pub num_messages_in_batch: Option<i32>,
pub event_time: Option<u64>,
pub encryption_keys: Vec<EncryptionKeys>,
pub encryption_algo: Option<String>,
pub encryption_param: Option<Vec<u8>>,
pub schema_version: Option<Vec<u8>>,
pub partition_key_b64_encoded: Option<bool>,
pub ordering_key: Option<Vec<u8>>,
pub deliver_at_time: Option<i64>,
pub marker_type: Option<i32>,
pub txnid_least_bits: Option<u64>,
pub txnid_most_bits: Option<u64>,
pub highest_sequence_id: Option<u64>,
pub null_value: Option<bool>,
pub uuid: Option<String>,
pub num_chunks_from_msg: Option<i32>,
pub total_chunk_msg_size: Option<i32>,
pub chunk_id: Option<i32>,
pub null_partition_key: Option<bool>,
}
Fields§
§producer_name: String
§sequence_id: u64
§publish_time: u64
§properties: Vec<KeyValue>
§replicated_from: Option<String>
Property set on replicated message, includes the source cluster name
partition_key: Option<String>
key to decide partition for the msg
replicate_to: Vec<String>
Override namespace’s replication
compression: Option<i32>
§uncompressed_size: Option<u32>
§num_messages_in_batch: Option<i32>
Removed below checksum field from Metadata as it should be part of send-command which keeps checksum of header + payload optional sfixed64 checksum = 10; differentiate single and batch message metadata
event_time: Option<u64>
the timestamp that this event occurs. it is typically set by applications.
if this field is omitted, publish_time
can be used for the purpose of event_time
.
encryption_keys: Vec<EncryptionKeys>
Contains encryption key name, encrypted key and metadata to describe the key
encryption_algo: Option<String>
Algorithm used to encrypt data key
encryption_param: Option<Vec<u8>>
Additional parameters required by encryption
schema_version: Option<Vec<u8>>
§partition_key_b64_encoded: Option<bool>
§ordering_key: Option<Vec<u8>>
Specific a key to overwrite the message key which used for ordering dispatch in Key_Shared mode.
deliver_at_time: Option<i64>
Mark the message to be delivered at or after the specified timestamp
marker_type: Option<i32>
Identify whether a message is a “marker” message used for internal metadata instead of application published data. Markers will generally not be propagated back to clients
txnid_least_bits: Option<u64>
transaction related message info
txnid_most_bits: Option<u64>
§highest_sequence_id: Option<u64>
/ Add highest sequence id to support batch message with external sequence id
null_value: Option<bool>
Indicate if the message payload value is set
uuid: Option<String>
§num_chunks_from_msg: Option<i32>
§total_chunk_msg_size: Option<i32>
§chunk_id: Option<i32>
§null_partition_key: Option<bool>
Indicate if the message partition key is set
Implementations§
source§impl MessageMetadata
impl MessageMetadata
sourcepub fn replicated_from(&self) -> &str
pub fn replicated_from(&self) -> &str
Returns the value of replicated_from
, or the default value if replicated_from
is unset.
sourcepub fn partition_key(&self) -> &str
pub fn partition_key(&self) -> &str
Returns the value of partition_key
, or the default value if partition_key
is unset.
sourcepub fn compression(&self) -> CompressionType
pub fn compression(&self) -> CompressionType
Returns the enum value of compression
, or the default if the field is unset or set to an invalid enum value.
sourcepub fn set_compression(&mut self, value: CompressionType)
pub fn set_compression(&mut self, value: CompressionType)
Sets compression
to the provided enum value.
sourcepub fn uncompressed_size(&self) -> u32
pub fn uncompressed_size(&self) -> u32
Returns the value of uncompressed_size
, or the default value if uncompressed_size
is unset.
sourcepub fn num_messages_in_batch(&self) -> i32
pub fn num_messages_in_batch(&self) -> i32
Returns the value of num_messages_in_batch
, or the default value if num_messages_in_batch
is unset.
sourcepub fn event_time(&self) -> u64
pub fn event_time(&self) -> u64
Returns the value of event_time
, or the default value if event_time
is unset.
sourcepub fn encryption_algo(&self) -> &str
pub fn encryption_algo(&self) -> &str
Returns the value of encryption_algo
, or the default value if encryption_algo
is unset.
sourcepub fn encryption_param(&self) -> &[u8] ⓘ
pub fn encryption_param(&self) -> &[u8] ⓘ
Returns the value of encryption_param
, or the default value if encryption_param
is unset.
sourcepub fn schema_version(&self) -> &[u8] ⓘ
pub fn schema_version(&self) -> &[u8] ⓘ
Returns the value of schema_version
, or the default value if schema_version
is unset.
sourcepub fn partition_key_b64_encoded(&self) -> bool
pub fn partition_key_b64_encoded(&self) -> bool
Returns the value of partition_key_b64_encoded
, or the default value if partition_key_b64_encoded
is unset.
sourcepub fn ordering_key(&self) -> &[u8] ⓘ
pub fn ordering_key(&self) -> &[u8] ⓘ
Returns the value of ordering_key
, or the default value if ordering_key
is unset.
sourcepub fn deliver_at_time(&self) -> i64
pub fn deliver_at_time(&self) -> i64
Returns the value of deliver_at_time
, or the default value if deliver_at_time
is unset.
sourcepub fn marker_type(&self) -> i32
pub fn marker_type(&self) -> i32
Returns the value of marker_type
, or the default value if marker_type
is unset.
sourcepub fn txnid_least_bits(&self) -> u64
pub fn txnid_least_bits(&self) -> u64
Returns the value of txnid_least_bits
, or the default value if txnid_least_bits
is unset.
sourcepub fn txnid_most_bits(&self) -> u64
pub fn txnid_most_bits(&self) -> u64
Returns the value of txnid_most_bits
, or the default value if txnid_most_bits
is unset.
sourcepub fn highest_sequence_id(&self) -> u64
pub fn highest_sequence_id(&self) -> u64
Returns the value of highest_sequence_id
, or the default value if highest_sequence_id
is unset.
sourcepub fn null_value(&self) -> bool
pub fn null_value(&self) -> bool
Returns the value of null_value
, or the default value if null_value
is unset.
sourcepub fn num_chunks_from_msg(&self) -> i32
pub fn num_chunks_from_msg(&self) -> i32
Returns the value of num_chunks_from_msg
, or the default value if num_chunks_from_msg
is unset.
sourcepub fn total_chunk_msg_size(&self) -> i32
pub fn total_chunk_msg_size(&self) -> i32
Returns the value of total_chunk_msg_size
, or the default value if total_chunk_msg_size
is unset.
sourcepub fn chunk_id(&self) -> i32
pub fn chunk_id(&self) -> i32
Returns the value of chunk_id
, or the default value if chunk_id
is unset.
sourcepub fn null_partition_key(&self) -> bool
pub fn null_partition_key(&self) -> bool
Returns the value of null_partition_key
, or the default value if null_partition_key
is unset.
Trait Implementations§
source§impl Clone for MessageMetadata
impl Clone for MessageMetadata
source§fn clone(&self) -> MessageMetadata
fn clone(&self) -> MessageMetadata
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for MessageMetadata
impl Debug for MessageMetadata
source§impl Default for MessageMetadata
impl Default for MessageMetadata
source§impl Message for MessageMetadata
impl Message for MessageMetadata
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
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<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.source§impl PartialEq for MessageMetadata
impl PartialEq for MessageMetadata
source§fn eq(&self, other: &MessageMetadata) -> bool
fn eq(&self, other: &MessageMetadata) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for MessageMetadata
Auto Trait Implementations§
impl Freeze for MessageMetadata
impl RefUnwindSafe for MessageMetadata
impl Send for MessageMetadata
impl Sync for MessageMetadata
impl Unpin for MessageMetadata
impl UnwindSafe for MessageMetadata
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more