File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Enqueue \Consumption ;
4
+
5
+ use Interop \Queue \PsrContext ;
6
+ use Interop \Queue \PsrProcessor ;
7
+ use Interop \Queue \PsrQueue ;
8
+
9
+ interface QueueConsumerInterface
10
+ {
11
+ /**
12
+ * Milliseconds.
13
+ */
14
+ public function setIdleTimeout (float $ timeout ): void ;
15
+
16
+ public function getIdleTimeout (): float ;
17
+
18
+ /**
19
+ * Milliseconds.
20
+ */
21
+ public function setReceiveTimeout (float $ timeout ): void ;
22
+
23
+ public function getReceiveTimeout (): float ;
24
+
25
+ public function getPsrContext (): PsrContext ;
26
+
27
+ /**
28
+ * @param string|PsrQueue $queueName
29
+ */
30
+ public function bind ($ queueName , PsrProcessor $ processor ): self ;
31
+
32
+ /**
33
+ * @param string|PsrQueue $queueName
34
+ * @param mixed $queue
35
+ */
36
+ public function bindCallback ($ queue , callable $ processor ): self ;
37
+
38
+ /**
39
+ * Runtime extension - is an extension or a collection of extensions which could be set on runtime.
40
+ * Here's a good example: @see LimitsExtensionsCommandTrait.
41
+ *
42
+ * @param ExtensionInterface|ChainExtension|null $runtimeExtension
43
+ *
44
+ * @throws \Exception
45
+ */
46
+ public function consume (ExtensionInterface $ runtimeExtension = null ): void ;
47
+ }
You can’t perform that action at this time.
0 commit comments