Support the ongoing development of Laravel.io →
posted 10 years ago
Queues

I am using Beanstalkd, and I want to queue particular types of jobs to different tubes (mail to one, images to another, etc). From what I understand, I should have just one connection in my config for beanstalkd like this:

		'beanstalkd' => array(
			'driver' => 'beanstalkd',
			'host'   => 'localhost',
			'queue'  => 'default',
			'ttr'    => 120,
		),

So if I just use e.g. Mail::queue, it will go into the default queue, or I can specify a specific tube with e.g. Mail::queueOn('tube').

I want to have one listener/worker per tube (so long-running image jobs won't block small email jobs), and it introduces a bit of parallelisation which is good.

The docs say I can listen to a particular connection, but is it possible to listen to one particular queue/tube on a connection?

Anyone used queues like this before and could offer some advice?

Thanks!

Edit: Ah, my mistake. You can specify with --queue which queue to listen on, which is separate from what connection you want to use.

Last updated 3 years ago.
0

Hi - I have a similar problem, and am not being able to find how I can have separate workers for separate jobs, just wondering if you've found the solution?

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

maknz maknz Joined 13 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.