forked from php-enqueue/monitoring
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SentMessageStats.php
108 lines (89 loc) · 1.83 KB
/
SentMessageStats.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
declare(strict_types=1);
namespace Enqueue\Monitoring;
class SentMessageStats implements Stats
{
/**
* @var int
*/
protected $timestampMs;
/**
* @var string
*/
protected $messageId;
/**
* @var string
*/
protected $correlationId;
/**
* @var string
*/
protected $destination;
/**
* @var bool
*/
protected $isTopic;
/**
* @var array
*/
protected $headers;
/**
* @var array
*/
protected $properties;
/**
* @var string
*/
protected $body;
public function __construct(
int $timestampMs,
string $destination,
bool $isTopic,
?string $messageId,
?string $correlationId,
array $headers,
array $properties,
string $body
) {
$this->timestampMs = $timestampMs;
$this->destination = $destination;
$this->isTopic = $isTopic;
$this->messageId = $messageId;
$this->correlationId = $correlationId;
$this->headers = $headers;
$this->properties = $properties;
$this->body = $body;
}
public function getTimestampMs(): int
{
return $this->timestampMs;
}
public function getDestination(): string
{
return $this->destination;
}
public function isTopic(): bool
{
return $this->isTopic;
}
public function getMessageId(): ?string
{
return $this->messageId;
}
public function getCorrelationId(): ?string
{
return $this->correlationId;
}
public function getHeaders(): array
{
return $this->headers;
}
public function getProperties(): array
{
return $this->properties;
}
public function getBody(): string
{
return $this->body;
}
}