8 use Symfony\Component\Console\Command\Command;
10 use Symfony\Component\Console\Input\InputInterface;
11 use Symfony\Component\Console\Output\OutputInterface;
24 private $consumerConfig;
36 parent::__construct(
$name);
44 $consumers = $this->getConsumers();
46 return \Magento\Framework\Console\Cli::RETURN_SUCCESS;
54 $this->setName(self::COMMAND_QUEUE_CONSUMERS_LIST);
55 $this->setDescription(
'List of MessageQueue consumers');
58 This command shows list of MessageQueue consumers.
67 private function getConsumers()
70 foreach ($this->getConsumerConfig()->getConsumers() as $consumer) {
71 $consumerNames[] = $consumer->getName();
73 return $consumerNames;
83 private function getConsumerConfig()
85 if ($this->consumerConfig ===
null) {
88 return $this->consumerConfig;
const COMMAND_QUEUE_CONSUMERS_LIST
execute(InputInterface $input, OutputInterface $output)
__construct(QueueConfig $queueConfig, $name=null)
if(!isset($_GET['name'])) $name