Trait apalis_core::mq::WithMq

source ·
pub trait WithMq<NS, Mq: MessageQueue<Self::Job>>: Sized {
    type Job;
    type Stream;

    // Required method
    fn with_mq(self, mq: Mq) -> WorkerBuilder<Self::Job, Self::Stream, NS>;
}
Available on crate feature mq only.
Expand description

A helper trait to help build a WorkerBuilder that consumes a MessageQueue

Required Associated Types§

source

type Job

The job to consume

source

type Stream

The MessageQueue to produce jobs

Required Methods§

source

fn with_mq(self, mq: Mq) -> WorkerBuilder<Self::Job, Self::Stream, NS>

The builder method to produce a default WorkerBuilder that will consume jobs

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<J: 'static, M, Mq> WithMq<Stack<Extension<Mq>, Stack<AckLayer<Mq, J>, M>>, Mq> for WorkerBuilder<(), (), M>where Mq: MessageQueue<J> + Send + Sync + 'static + Clone + Ack<J>, M: Send + Sync + 'static,

§

type Job = J

§

type Stream = Pin<Box<dyn Stream<Item = Result<Option<JobRequest<J>>, JobStreamError>> + Send>>