Pheanstalk in Laravel, Everything ends up as an unhandled response?-Collection of common programming errors

Ive installed the Pheanstalk bundle for Laravel (https://github.com/mikelbring/Pheanstalk) I am now following the basic example code to try and pass a job to the queue and retrieve it back again.

This is my code:

Route::get('queue', function()
{

Pheanstalk::useTube('testtube')->put("job payload goes here\n");

$pheanstalk = Pheanstalk::connection();

$job = $pheanstalk
  ->watch('testtube')
  ->ignore('default')
  ->reserve();

echo $job->getData();

$pheanstalk->delete($job);
});

Yet when i run it, i get an ‘Unhandled Response’ error, like nothing has been returned.

Unhandled Exception

Message:

Unhandled response: 
Location:

C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk\Command\PutCommand.php on line 108
Stack Trace:

 #0 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk\Connection.php(121): Pheanstalk_Command_PutCommand->parseResponse('', NULL)
#1 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk.php(511): Pheanstalk_Connection->dispatchCommand(Object(Pheanstalk_Command_PutCommand))
#2 C:\wamp\www\adam\phire\bundles\pheanstalk\pheanstalk\classes\Pheanstalk.php(273): Pheanstalk\Pheanstalk->_dispatch(Object(Pheanstalk_Command_PutCommand))
#3 C:\wamp\www\adam\phire\application\routes.php(45): Pheanstalk\Pheanstalk->put('job payload goe...')
#4 [internal function]: Laravel\Bundle::{closure}()
#5 C:\wamp\www\adam\phire\laravel\routing\route.php(163): call_user_func_array(Object(Closure), Array)
#6 C:\wamp\www\adam\phire\laravel\routing\route.php(124): Laravel\Routing\Route->response()
#7 C:\wamp\www\adam\phire\laravel\laravel.php(167): Laravel\Routing\Route->call()
#8 C:\wamp\www\adam\phire\public\index.php(34): require('C:\wamp\www\ada...')
#9 {main}

Is anyone familiar with Pheanstalk and can provide some assistance?

Thanks Adam.

  1. Here is where that exception gets raised. Seems like your beanstalkd is returning something that pheanstalk doesn’t understand. Are you sure you’re connecting to a working beanstalkd implementation?

    It doesn’t seem to be an issue with the Pheanstalk Laravel bundle. Have you tried testing with a regular Pheanstalk using the same connection details?

Originally posted 2013-11-27 12:25:32.