Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
messages_done_recent.php
Go to the documentation of this file.
1 <?php
8 
10 $messageFactory = $objectManager->create(\Magento\MysqlMq\Model\MessageFactory::class);
12  ->load('topic.updated.use.just.in.tests', 'topic_name');
13 
15 
17 $queueFactory = $objectManager->create(\Magento\MysqlMq\Model\QueueFactory::class);
19  ->load('queue4', Magento\MysqlMq\Model\Queue::KEY_NAME)
20  ->getId();
21 
22 $plan = [
24 ];
25 
27 $messageStatusFactory = $objectManager->create(\Magento\MysqlMq\Model\MessageStatusFactory::class);
28 foreach ($plan as $instruction) {
29  $messageStatus = $messageStatusFactory->create();
30 
31  $messageStatus->setQueueId($instruction[1])
32  ->setMessageId($instruction[0])
33  ->setUpdatedAt($instruction[2])
34  ->setStatus($instruction[3])
35  ->save();
36 }
$messageStatusFactory