PullConsumerBuilder

Struct PullConsumerBuilder 

Source
pub struct PullConsumerBuilder<T, C: CodecType> { /* private fields */ }
Expand description

Builder for creating pull consumers.

Implementations§

Source§

impl<T, C: CodecType> PullConsumerBuilder<T, C>

Source

pub fn durable(self) -> Self

Make this a durable consumer.

Source

pub fn durable_name(self, name: impl Into<String>) -> Self

Set the durable name (different from consumer name).

Source

pub fn filter_subject(self, subject: impl Into<String>) -> Self

Set a filter subject.

Source

pub fn filter_subjects(self, subjects: Vec<String>) -> Self

Set multiple filter subjects.

Source

pub fn description(self, description: impl Into<String>) -> Self

Set the description.

Source

pub fn ack_policy(self, policy: AckPolicy) -> Self

Set the ack policy.

Source

pub fn ack_wait(self, duration: Duration) -> Self

Set the ack wait duration.

Source

pub fn max_deliver(self, max: i64) -> Self

Set the maximum number of deliveries.

Source

pub fn replay_policy(self, policy: ReplayPolicy) -> Self

Set the replay policy.

Source

pub fn deliver_policy(self, policy: DeliverPolicy) -> Self

Set the deliver policy.

Source

pub fn start_sequence(self, seq: u64) -> Self

Start at a specific sequence.

Source

pub fn start_time(self, time: OffsetDateTime) -> Self

Start at a specific time.

Source

pub fn max_ack_pending(self, max: i64) -> Self

Set the maximum ack pending.

Source

pub fn max_waiting(self, max: i64) -> Self

Set the maximum waiting.

Source

pub fn max_batch(self, max: i64) -> Self

Set the maximum batch size.

Source

pub fn max_bytes(self, max: i64) -> Self

Set the maximum bytes.

Source

pub fn max_expires(self, duration: Duration) -> Self

Set the maximum expiry.

Source

pub fn inactive_threshold(self, duration: Duration) -> Self

Set the inactive threshold.

Source

pub fn headers_only(self, headers_only: bool) -> Self

Set headers only.

Source

pub fn replicas(self, replicas: usize) -> Self

Set the number of replicas.

Source

pub fn memory_storage(self, memory: bool) -> Self

Set memory storage.

Source

pub fn backoff(self, backoff: Vec<Duration>) -> Self

Set the backoff durations for redelivery.

Source

pub fn metadata(self, metadata: HashMap<String, String>) -> Self

Set metadata.

Source

pub async fn create(self) -> Result<PullConsumer<T, C>>

Create the consumer.

Source

pub async fn create_or_update(self) -> Result<PullConsumer<T, C>>

Create or update the consumer.

Auto Trait Implementations§

§

impl<T, C> Freeze for PullConsumerBuilder<T, C>

§

impl<T, C> !RefUnwindSafe for PullConsumerBuilder<T, C>

§

impl<T, C> Send for PullConsumerBuilder<T, C>
where T: Send,

§

impl<T, C> Sync for PullConsumerBuilder<T, C>
where T: Sync,

§

impl<T, C> Unpin for PullConsumerBuilder<T, C>
where T: Unpin, C: Unpin,

§

impl<T, C> !UnwindSafe for PullConsumerBuilder<T, C>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more