You need to do additional configuration in the queue configuration file, so it will look something like this:
'connections' => array( 'beanstalkd' => array( 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', ), 'beanstalkd_remote' => array( 'driver' => 'beanstalkd', 'host' => 'remotehost', 'queue' => 'default', ) )
If the default value is "beanstalkd", you can continue to call it the usual way.
If you want to use the remote queue, just define the connection in the call, for example:
Queue::connection('beanstalkd_remote')->push(function($job) {
source share