public function getProducer() { if (null === $this->producer) { throw new QueueException('Queue - producer is undefined'); } return $this->producer; }