[][src]Struct pulsar::consumer::ConsumerBuilder

pub struct ConsumerBuilder<Exe: Executor> { /* fields omitted */ }

Implementations

impl<Exe: Executor> ConsumerBuilder<Exe>[src]

pub fn new(pulsar: &Pulsar<Exe>) -> Self[src]

pub fn with_topic<S: Into<String>>(self, topic: S) -> ConsumerBuilder<Exe>[src]

pub fn with_topics<S: AsRef<str>, I: IntoIterator<Item = S>>(
    self,
    topics: I
) -> ConsumerBuilder<Exe>
[src]

pub fn with_topic_regex(self, regex: Regex) -> ConsumerBuilder<Exe>[src]

pub fn with_subscription<S: Into<String>>(self, subscription: S) -> Self[src]

pub fn with_subscription_type(self, subscription_type: SubType) -> Self[src]

pub fn with_lookup_namespace<S: Into<String>>(self, namespace: S) -> Self[src]

Tenant/Namespace to be used when matching against a regex. For other consumers, specify namespace using the <persistent|non-persistent://<tenant>/<namespace>/<topic> topic format. Defaults to public/default if not specifid

pub fn with_topic_refresh(self, refresh_interval: Duration) -> Self[src]

Interval for refreshing the topics when using a topic regex. Unused otherwise.

pub fn with_consumer_id(self, consumer_id: u64) -> Self[src]

pub fn with_consumer_name<S: Into<String>>(self, consumer_name: S) -> Self[src]

pub fn with_batch_size(self, batch_size: u32) -> Self[src]

pub fn with_options(self, options: ConsumerOptions) -> Self[src]

pub fn with_dead_letter_policy(
    self,
    dead_letter_policy: DeadLetterPolicy
) -> Self
[src]

pub fn with_unacked_message_resend_delay(self, delay: Option<Duration>) -> Self[src]

The time after which a message is dropped without being acknowledged or nacked that the message is resent. If None, messages will only be resent when a consumer disconnects with pending unacknowledged messages.

pub async fn build<T: DeserializeMessage>(
    self
) -> Result<Consumer<T, Exe>, Error>
[src]

Trait Implementations

impl<Exe: Clone + Executor> Clone for ConsumerBuilder<Exe>[src]

Auto Trait Implementations

impl<Exe> !RefUnwindSafe for ConsumerBuilder<Exe>

impl<Exe> Send for ConsumerBuilder<Exe>

impl<Exe> Sync for ConsumerBuilder<Exe>

impl<Exe> Unpin for ConsumerBuilder<Exe>

impl<Exe> !UnwindSafe for ConsumerBuilder<Exe>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,