Total Complexity | 4 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php declare(strict_types = 1); |
||
8 | abstract class AbstractProducer |
||
9 | { |
||
10 | public const DELIVERY_MODE_NON_PERSISTENT = 1; |
||
11 | |||
12 | public const DELIVERY_MODE_PERSISTENT = 2; |
||
13 | |||
14 | public const CONTENT_TYPE_APPLICATION_JSON = 'application/json'; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * @param mixed $body |
||
19 | * @return bool|int|PromiseInterface |
||
20 | */ |
||
21 | final public function produce(Channel $channel, $body) |
||
30 | ); |
||
31 | } |
||
32 | |||
33 | |||
34 | abstract protected function getExchangeName(): string; |
||
35 | |||
36 | |||
37 | abstract protected function getRoutingKey(): string; |
||
38 | |||
39 | |||
40 | protected function getHeaders(): array |
||
41 | { |
||
42 | return []; |
||
43 | } |
||
44 | |||
45 | |||
46 | protected function isMandatory(): bool |
||
49 | } |
||
50 | |||
51 | |||
52 | protected function isImmediate(): bool |
||
58 |