Skip to content
Kona

Queues

Queues let your app finish a request quickly and do heavier work moments later — send mail, resize images, call slow APIs — on a separate worker process.

Register QueueServiceProvider, then dispatch jobs through Bus. Jobs that implement ShouldQueue are pushed onto a connection; everything else runs immediately.

Guide Use when
Jobs & dispatch Writing job classes, delay, chains, batches, middleware
Workers Running ./grind queue:work and worker options
Failed jobs Listing, retrying, and durable failed storage
class SendInvoice : Job, ShouldQueue {
override fun handle() { /* … */ }
}
val bus = app.resolve(Bus::class.java)
bus.dispatch(SendInvoice())
Bus bus = app.resolve(Bus.class);
bus.dispatch(new SendInvoice());
Terminal window
./grind queue:work --connection=array --stop-when-empty

Configure queue.default and queue.connections.{name}.driver:

Driver Role
sync Run inline on dispatch (delay ignored)
array / memory In-process queue for tests and local workers
redis Shared Redis list (needs RedisManager)
database jobs table (needs Cadence Database)

Default queue name per connection: queue.connections.{name}.queue (fallback default).

From ./grind steam, resolve Bus / QueueManager after boot and dispatch jobs interactively while a worker runs in another terminal.