/**
  * @param AmqpDriver            $driver    Driver for amqp
  * @param MessageEventConverter $converter Convert amqp message to event
  * @param string                $queue     Queue name for consumption
  */
 public function __construct(AmqpDriver $driver, MessageEventConverter $converter, $queue)
 {
     $this->driver = $driver;
     $this->converter = $converter;
     $this->queue = $queue;
     $this->logger = LoggerFactory::getLogger(__CLASS__);
 }
 /**
  * @param AmqpDriver            $driver     Driver for amqp
  * @param MessageEventConverter $converter  Event will be converted to message
  * @param string                $exchange   Name of exchange
  * @param EventRouter|null      $router     If not null routing key will be generate with router
  * @param bool                  $persistent Message will be persistent or not
  * @param bool                  $mandatory  Check if message is routed to queues
  * @param bool                  $immediate  Message should be consumed immediately
  */
 public function __construct(AmqpDriver $driver, MessageEventConverter $converter, $exchange, EventRouter $router = null, $persistent = true, $mandatory = false, $immediate = false)
 {
     $this->driver = $driver;
     $this->converter = $converter;
     $this->exchange = $exchange;
     $this->router = $router;
     $this->persistent = $persistent;
     $this->mandatory = $mandatory;
     $this->immediate = $immediate;
     $this->logger = LoggerFactory::getLogger(__CLASS__);
 }
 public function __construct(AmqpDriver $driver)
 {
     $this->driver = $driver;
     $this->logger = LoggerFactory::getLogger(__CLASS__);
 }