-
Notifications
You must be signed in to change notification settings - Fork 440
/
Copy pathDriverInterface.php
37 lines (24 loc) · 1023 Bytes
/
DriverInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
declare(strict_types=1);
namespace Enqueue\Client;
use Interop\Queue\Context;
use Interop\Queue\Message as InteropMessage;
use Interop\Queue\Queue as InteropQueue;
use Psr\Log\LoggerInterface;
interface DriverInterface
{
public function createTransportMessage(Message $message): InteropMessage;
public function createClientMessage(InteropMessage $message): Message;
public function sendToRouter(Message $message): DriverSendResult;
public function sendToProcessor(Message $message): DriverSendResult;
public function createQueue(string $queueName, bool $prefix = true): InteropQueue;
public function createRouteQueue(Route $route): InteropQueue;
/**
* Prepare broker for work.
* Creates all required queues, exchanges, topics, bindings etc.
*/
public function setupBroker(?LoggerInterface $logger = null): void;
public function getConfig(): Config;
public function getContext(): Context;
public function getRouteCollection(): RouteCollection;
}