| Total Complexity | 5 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | class RabbitMQFacade extends AbstractFacade |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * Initiate the exchanges and queues in RabbitMQ |
||
| 19 | * |
||
| 20 | * @api |
||
| 21 | */ |
||
| 22 | 2 | public function init(): void |
|
| 23 | { |
||
| 24 | 2 | $this->getFactory()->createBootstrapper()->boot(); |
|
| 25 | 2 | } |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param \DataProvider\RabbitMqMessageDataProvider $messageDataProvider |
||
| 29 | */ |
||
| 30 | 1 | public function sendMessage(RabbitMqMessageDataProvider $messageDataProvider): void |
|
| 33 | 1 | } |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param \DataProvider\RabbitMqMessageCollectionDataProvider $messageCollectionDataProvider |
||
| 37 | */ |
||
| 38 | 1 | public function sendMessages(RabbitMqMessageCollectionDataProvider $messageCollectionDataProvider): void |
|
| 39 | { |
||
| 40 | 1 | $this->getFactory()->getMessageProvider()->sendBulk($messageCollectionDataProvider); |
|
| 41 | 1 | } |
|
| 42 | |||
| 43 | /** |
||
| 44 | * @throws \Xervice\RabbitMQ\Worker\Listener\ListenerException |
||
| 45 | */ |
||
| 46 | 2 | public function runWorker(): void |
|
| 47 | { |
||
| 48 | 2 | $this->getFactory()->createWorker()->runWorker(); |
|
| 49 | 2 | } |
|
| 50 | |||
| 51 | public function close(): void |
||
| 54 | } |
||
| 55 | } |
||
| 56 |