public function work() { try { $message = ChangeVO::create(); $message->setDatetime(new DateTime())->setMessage("Hi there!"); $this->changeProducer->publish($message); } catch (\Exception $e) { $this->log->critical("Couldn't push to pipeline. Possible missing rabbit on your machine?"); throw $e; } }
public function preProcessMessage(ChangeVO $change) { $change->setHostname(gethostname())->setApplication($this->applicationName); }