Example #1
0
 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;
     }
 }
Example #2
0
 public function preProcessMessage(ChangeVO $change)
 {
     $change->setHostname(gethostname())->setApplication($this->applicationName);
 }