1 | <?php |
||
5 | class QueueArgument extends BaseObject |
||
6 | { |
||
7 | /** |
||
8 | * @var integer |
||
9 | * How long a message published to a queue can live before it is discarded (milliseconds). |
||
10 | */ |
||
11 | const MESSAGE_TTL = 'message-ttl'; |
||
12 | |||
13 | /** |
||
14 | * @var integer |
||
15 | * How long a queue can be unused for before it is automatically deleted (milliseconds). |
||
16 | */ |
||
17 | const EXPIRES = 'expires'; |
||
18 | |||
19 | /** |
||
20 | * @var integer |
||
21 | * How many (ready) messages a queue can contain before it starts to drop them from its head. |
||
22 | */ |
||
23 | const MAX_LENGTH = 'max-length'; |
||
24 | |||
25 | /** |
||
26 | * @var integer |
||
27 | * Total body size for ready messages a queue can contain before it starts to drop them from its head. |
||
28 | */ |
||
29 | const MAX_BYTES = 'max-length-bytes'; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | * Name of an exchange to which messages will be republished if they are rejected or expire. |
||
34 | */ |
||
35 | const MAX_DEAD_LETTER_EXCHAGE = 'dead-letter-exchange'; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | * Replacement routing key to use when a message is dead-lettered. If this is not set, the message's original routing key will be used. |
||
40 | */ |
||
41 | const MAX_DEAD_LETTER_ROUTING_KEY = 'dead-letter-routing-key'; |
||
42 | |||
43 | /** |
||
44 | * @var integer |
||
45 | * Maximum number of priority levels for the queue to support; |
||
46 | * if not set, the queue will not support message priorities. |
||
47 | */ |
||
48 | const MAX_PRIORITY = 'max-priority'; |
||
49 | |||
50 | private $argumentName; |
||
51 | |||
52 | /** |
||
53 | * @return String |
||
54 | */ |
||
55 | 17 | public function getArgumentName() |
|
59 | |||
60 | 17 | public function __construct(String $argument, string $value) |
|
66 | |||
67 | 17 | public function validate($value) : bool |
|
89 | } |
||
90 |