Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-mysql-mq
Model
Driver
Exchange.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\MysqlMq\Model\Driver
;
7
8
use
Magento\Framework\MessageQueue\EnvelopeInterface
;
9
use
Magento\Framework\MessageQueue\ExchangeInterface
;
10
use
Magento\Framework\MessageQueue\ConfigInterface
as MessageQueueConfig;
11
use
Magento\MysqlMq\Model\QueueManagement
;
12
13
class
Exchange
implements
ExchangeInterface
14
{
18
private
$messageQueueConfig;
19
23
private
$queueManagement;
24
31
public
function
__construct
(MessageQueueConfig $messageQueueConfig,
QueueManagement
$queueManagement)
32
{
33
$this->messageQueueConfig = $messageQueueConfig;
34
$this->queueManagement = $queueManagement;
35
}
36
44
public
function
enqueue
($topic,
EnvelopeInterface
$envelope)
45
{
46
$queueNames = $this->messageQueueConfig->getQueuesByTopic($topic);
47
$this->queueManagement->addMessageToQueues($topic, $envelope->
getBody
(), $queueNames);
48
return
null
;
49
}
50
}
Magento\MysqlMq\Model\QueueManagement
Definition:
QueueManagement.php:14
Magento\MysqlMq\Model\Driver\Exchange\enqueue
enqueue($topic, EnvelopeInterface $envelope)
Definition:
Exchange.php:44
Magento\Framework\MessageQueue\EnvelopeInterface
Definition:
EnvelopeInterface.php:11
Magento\MysqlMq\Model\Driver\Exchange\__construct
__construct(MessageQueueConfig $messageQueueConfig, QueueManagement $queueManagement)
Definition:
Exchange.php:31
Magento\MysqlMq\Model\Driver
Definition:
QueueTest.php:6
Magento\Framework\MessageQueue\EnvelopeInterface\getBody
getBody()
Magento\Framework\MessageQueue\ExchangeInterface
Definition:
ExchangeInterface.php:13
Magento\Framework\MessageQueue\ConfigInterface
Definition:
ConfigInterface.php:14
Magento\MysqlMq\Model\Driver\Exchange
Definition:
Exchange.php:13