Trait disqrust::Handler [] [src]

pub trait Handler {
    fn process_job(&self, queue_name: &[u8], jobid: &String, body: Vec<u8>) -> JobStatus;

    fn process_error(&self, _: &[u8], _: &String, _: u32, _: u32) -> bool { ... }
}

Handles a job task.

Required Methods

fn process_job(&self, queue_name: &[u8], jobid: &String, body: Vec<u8>) -> JobStatus

Process a job.

Provided Methods

fn process_error(&self, _: &[u8], _: &String, _: u32, _: u32) -> bool

Decides if a job that failed in the past should be re-executed. nack is the count of negatives acknowledges. additional_deliveries is the number of times the job was processed but it was not acknowledged.

Implementors