1 | <?php |
||
11 | class RabbitMqMessagePusher implements MessagePusherInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var BrokerModel |
||
15 | */ |
||
16 | private $brokerModel; |
||
17 | |||
18 | /** |
||
19 | * @var MessageProcessor |
||
20 | */ |
||
21 | private $messageProcessor; |
||
22 | |||
23 | /** |
||
24 | * @var PushPipe |
||
25 | */ |
||
26 | private $pushPipe; |
||
27 | |||
28 | /** |
||
29 | * @var PushSettings |
||
30 | */ |
||
31 | private $pushSettings; |
||
32 | |||
33 | /** |
||
34 | * @param BrokerModel $brokerModel |
||
35 | * @param MessageProcessor $messageProcessor |
||
36 | */ |
||
37 | 4 | public function __construct( |
|
44 | |||
45 | /** |
||
46 | * It initializes the message pusher with the pipe it will send messages through. |
||
47 | * The pipe is invoked for each incoming message. |
||
48 | * |
||
49 | * @param PushPipe $pushPipe |
||
50 | * @param PushSettings $pushSettings |
||
51 | */ |
||
52 | 3 | public function init(PushPipe $pushPipe, PushSettings $pushSettings) |
|
61 | |||
62 | /** |
||
63 | * Starts pushing messages |
||
64 | */ |
||
65 | 1 | public function start() |
|
81 | } |
||
82 |