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():
4949asyncio.run(main())
5050```
5151
52- ## RedisBroker configuration
52+ ## PubSubBroker and ListQueueBroker configuration
5353
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:
5563* ` url ` - url to redis.
5664* ` task_id_generator ` - custom task_id genertaor.
5765* ` result_backend ` - custom result backend.
You can’t perform that action at this time.
0 commit comments