onWorkerStart = function() { Client::connect(); Client::on('test event', function($event_data){ echo 'test event triggered event_data :'; var_dump($event_data); }); Timer::add(2, function(){ Client::publish('test event', 'some data'); }); }; Worker::runAll();