pub struct CommandSubscribe {Show 17 fields
pub topic: String,
pub subscription: String,
pub sub_type: i32,
pub consumer_id: u64,
pub request_id: u64,
pub consumer_name: Option<String>,
pub priority_level: Option<i32>,
pub durable: Option<bool>,
pub start_message_id: Option<MessageIdData>,
pub metadata: Vec<KeyValue>,
pub read_compacted: Option<bool>,
pub schema: Option<Schema>,
pub initial_position: Option<i32>,
pub replicate_subscription_state: Option<bool>,
pub force_topic_creation: Option<bool>,
pub start_message_rollback_duration_sec: Option<u64>,
pub key_shared_meta: Option<KeySharedMeta>,
}Fields§
§topic: String§subscription: String§sub_type: i32§consumer_id: u64§request_id: u64§consumer_name: Option<String>§priority_level: Option<i32>§durable: Option<bool>Signal wether the subscription should be backed by a durable cursor or not
start_message_id: Option<MessageIdData>If specified, the subscription will position the cursor markd-delete position on the particular message id and will send messages from that point
metadata: Vec<KeyValue>§read_compacted: Option<bool>§schema: Option<Schema>§initial_position: Option<i32>Signal whether the subscription will initialize on latest or not – earliest
replicate_subscription_state: Option<bool>Mark the subscription as “replicated”. Pulsar will make sure to periodically sync the state of replicated subscriptions across different clusters (when using geo-replication).
force_topic_creation: Option<bool>If true, the subscribe operation will cause a topic to be created if it does not exist already (and if topic auto-creation is allowed by broker. If false, the subscribe operation will fail if the topic does not exist.
start_message_rollback_duration_sec: Option<u64>If specified, the subscription will reset cursor’s position back to specified seconds and will send messages from that point
Implementations§
Source§impl CommandSubscribe
impl CommandSubscribe
Sourcepub fn sub_type(&self) -> SubType
pub fn sub_type(&self) -> SubType
Returns the enum value of sub_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_sub_type(&mut self, value: SubType)
pub fn set_sub_type(&mut self, value: SubType)
Sets sub_type to the provided enum value.
Sourcepub fn consumer_name(&self) -> &str
pub fn consumer_name(&self) -> &str
Returns the value of consumer_name, or the default value if consumer_name is unset.
Sourcepub fn priority_level(&self) -> i32
pub fn priority_level(&self) -> i32
Returns the value of priority_level, or the default value if priority_level is unset.
Sourcepub fn durable(&self) -> bool
pub fn durable(&self) -> bool
Returns the value of durable, or the default value if durable is unset.
Sourcepub fn read_compacted(&self) -> bool
pub fn read_compacted(&self) -> bool
Returns the value of read_compacted, or the default value if read_compacted is unset.
Sourcepub fn initial_position(&self) -> InitialPosition
pub fn initial_position(&self) -> InitialPosition
Returns the enum value of initial_position, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_initial_position(&mut self, value: InitialPosition)
pub fn set_initial_position(&mut self, value: InitialPosition)
Sets initial_position to the provided enum value.
Sourcepub fn replicate_subscription_state(&self) -> bool
pub fn replicate_subscription_state(&self) -> bool
Returns the value of replicate_subscription_state, or the default value if replicate_subscription_state is unset.
Sourcepub fn force_topic_creation(&self) -> bool
pub fn force_topic_creation(&self) -> bool
Returns the value of force_topic_creation, or the default value if force_topic_creation is unset.
Sourcepub fn start_message_rollback_duration_sec(&self) -> u64
pub fn start_message_rollback_duration_sec(&self) -> u64
Returns the value of start_message_rollback_duration_sec, or the default value if start_message_rollback_duration_sec is unset.
Trait Implementations§
Source§impl Clone for CommandSubscribe
impl Clone for CommandSubscribe
Source§fn clone(&self) -> CommandSubscribe
fn clone(&self) -> CommandSubscribe
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandSubscribe
impl Debug for CommandSubscribe
Source§impl Default for CommandSubscribe
impl Default for CommandSubscribe
Source§impl Message for CommandSubscribe
impl Message for CommandSubscribe
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 CommandSubscribe
impl PartialEq for CommandSubscribe
impl StructuralPartialEq for CommandSubscribe
Auto Trait Implementations§
impl Freeze for CommandSubscribe
impl RefUnwindSafe for CommandSubscribe
impl Send for CommandSubscribe
impl Sync for CommandSubscribe
impl Unpin for CommandSubscribe
impl UnsafeUnpin for CommandSubscribe
impl UnwindSafe for CommandSubscribe
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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