-
Notifications
You must be signed in to change notification settings - Fork 10
/
NullAcknowledgementHandler.php
69 lines (62 loc) · 1.66 KB
/
NullAcknowledgementHandler.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
<?php
/**
* This file is part of graze/queue.
*
* Copyright (c) 2015 Nature Delivered Ltd. <https://www.graze.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license https://github.com/graze/queue/blob/master/LICENSE MIT
*
* @link https://github.com/graze/queue
*/
namespace Graze\Queue\Handler;
use Graze\Queue\Adapter\AdapterInterface;
use Graze\Queue\Message\MessageInterface;
class NullAcknowledgementHandler extends AbstractAcknowledgementHandler
{
/**
* @param MessageInterface $message
* @param AdapterInterface $adapter
* @param mixed $result
*/
protected function acknowledge(
MessageInterface $message,
AdapterInterface $adapter,
$result = null
) {
// Don't acknowledge.
}
/**
* @param MessageInterface $message
* @param AdapterInterface $adapter
* @param int $duration Number of seconds to ensure that this message is not seen by any other clients
*/
protected function extend(
MessageInterface $message,
AdapterInterface $adapter,
$duration
) {
// Don't delay
}
/**
* @param MessageInterface $message
* @param AdapterInterface $adapter
* @param mixed $result
*/
protected function reject(
MessageInterface $message,
AdapterInterface $adapter,
$result = null
) {
// Don't reject
}
/**
* @param AdapterInterface $adapter
*/
protected function flush(AdapterInterface $adapter)
{
// Nothing to flush.
}
}