Producing

$mixedData is added on v1.0 for complex usage. Anything else then string will be send as json format. So you can sent anything within it suppoted by json.

Worker

For worker it also has a built in controller which runs an infinite loop and wait for new jobs. Most of the work is done in BeanstalkController. All you have to do is to create a controller and action like below.

Controller

Create a controller under your commands folder. Give the name anything you want to it and extend your controller from udokmeci\yii2beanstalk\BeanstalkController

Running Worker

Running console is the easiest part. Run ./yii Your controller

$> php ./yii worker

Controller will tell you, whether there are actions for correspanding tubes or beanstalk server is accessible and which tubes are listening currently. The controller handles with signals. So exit whenever you want, reserved job will not be hanged.