public function __construct(AMQPQueue $queue, LoopInterface $loop, Serializer $serializer) { $this->queue = $queue; $this->loop = $loop; $this->timer = $this->loop->addPeriodicTimer(1, [$this, 'listen']); $this->serializer = $serializer; }