exchangeFactory = $exchangeFactory; } /** * Get exchange from the pool for the specified connection type. * * @param string $connectionName * @return ExchangeInterface * @throws \LogicException */ public function getByConnectionName($connectionName) { if (!isset($this->exchangePool[$connectionName])) { $exchange = $this->exchangeFactory->create($connectionName); $this->exchangePool[$connectionName] = $exchange; } return $this->exchangePool[$connectionName]; } }