You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,18 @@ async def test() -> None:
28
28
29
29
### Default delays
30
30
31
-
To send delayed message, you have to specify delay label. You can do it with `task` decorator, or by using kicker.
31
+
To send delayed messagem, you need to specify queue for delayed messages. You can do it by passing `delay_queue` parameter to the broker. For example:
32
+
33
+
```python
34
+
from taskiq_aio_pika import AioPikaBroker, Queue, QueueType
35
+
36
+
broker = AioPikaBroker(
37
+
...,
38
+
delay_queue=Queue(name="taskiq.delay_queue"),
39
+
)
40
+
```
41
+
42
+
After that you have to specify delay label. You can do it with `task` decorator, or by using kicker.
32
43
33
44
In this type of delay we are using additional queue with `expiration` parameter. After declared time message will be deleted from `delay` queue and sent to the main queue. For example:
0 commit comments