16 private $objectManager;
21 private $queueInstances;
26 private $queueFactory;
47 public function get($connectionName, $queueName)
49 if (!isset($this->queueInstances[$connectionName][$queueName])) {
50 $queue = $this->getQueueFactory()->create($queueName, $connectionName);
51 $this->queueInstances[$connectionName][$queueName] =
$queue;
53 return $this->queueInstances[$connectionName][$queueName];
62 private function getQueueFactory()
64 if ($this->queueFactory ===
null) {
65 $this->queueFactory = $this->objectManager->get(QueueFactoryInterface::class);
67 return $this->queueFactory;
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, array $queues=[])