-
Notifications
You must be signed in to change notification settings - Fork 1
/
DeliveryOptions.php
51 lines (42 loc) · 1021 Bytes
/
DeliveryOptions.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
/**
* PHP Service Bus common component.
*
* @author Maksim Masiukevich <contacts@desperado.dev>
* @license MIT
* @license https://opensource.org/licenses/MIT
*/
declare(strict_types = 0);
namespace ServiceBus\Common\Endpoint;
/**
* Message delivery options.
*/
interface DeliveryOptions
{
/**
* Create options instance.
*/
public static function create(): self;
/**
* Apply headers.
*/
public function withHeader(string $key, int|float|string|null $value): self;
/**
* Receive headers.
*
* @psalm-return array<string, int|float|string|null>
*/
public function headers(): array;
/**
* Should the message be saved?
*/
public function isPersistent(): bool;
/**
* Should the message be processed with the highest priority?
*/
public function isHighestPriority(): bool;
/**
* After how many seconds the message will be marked as expired.
*/
public function expirationAfter(): ?int;
}