@@ 45-55 (lines=11) @@ | ||
42 | * @param AdapterInterface $adapter |
|
43 | * @param mixed $result |
|
44 | */ |
|
45 | protected function acknowledge( |
|
46 | MessageInterface $message, |
|
47 | AdapterInterface $adapter, |
|
48 | $result = null |
|
49 | ) { |
|
50 | $this->acknowledged[] = $message; |
|
51 | ||
52 | if (count($this->acknowledged) === $this->batchSize) { |
|
53 | $this->flush($adapter); |
|
54 | } |
|
55 | } |
|
56 | ||
57 | /** |
|
58 | * @param MessageInterface $message |
|
@@ 62-72 (lines=11) @@ | ||
59 | * @param AdapterInterface $adapter |
|
60 | * @param mixed $result |
|
61 | */ |
|
62 | protected function reject( |
|
63 | MessageInterface $message, |
|
64 | AdapterInterface $adapter, |
|
65 | $result = null |
|
66 | ) { |
|
67 | $this->rejected[] = $message; |
|
68 | ||
69 | if (count($this->rejected) === $this->batchSize) { |
|
70 | $this->flush($adapter); |
|
71 | } |
|
72 | } |
|
73 | ||
74 | /** |
|
75 | * @param AdapterInterface $adapter |