Differentes queues

queues
Tags: #<Tag:0x00007f64b6b15720>

#1

Hi

I have 3 types on procedures: Import, Emails and Notifications
I want to create one queue for each one and backgroundjob for each one

How can i set the queue in BackgroundJob.Enqueue ?


#2

It’s explained here https://docs.hangfire.io/en/latest/background-processing/configuring-queues.html. Furhtermore you may provide a EnqueuedState when enqueing your job if you don’t want to use attributes. Eg:

var client = new BackgroundJobClient();
var state = new EnqueuedState("QueueName");
client.Create(() => SomeJob(), state);