File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -49,9 +49,17 @@ async def main():
49
49
asyncio.run(main())
50
50
```
51
51
52
- ## RedisBroker configuration
52
+ ## PubSubBroker and ListQueueBroker configuration
53
53
54
- RedisBroker parameters:
54
+ We have two brokers with similar interfaces, but with different logic.
55
+ The PubSubBroker uses redis' pubsub mechanism and is very powerful,
56
+ but it executes every task on all workers, because PUBSUB broadcasts message
57
+ to all subscribers.
58
+
59
+ If you want your messages to be processed only once, please use ListQueueBroker.
60
+ It uses redis' [ LPUSH] ( https://redis.io/commands/lpush/ ) and [ BRPOP] ( https://redis.io/commands/brpop/ ) commands to deal with messages.
61
+
62
+ Brokers parameters:
55
63
* ` url ` - url to redis.
56
64
* ` task_id_generator ` - custom task_id genertaor.
57
65
* ` result_backend ` - custom result backend.
You can’t perform that action at this time.
0 commit comments