Skip to content

Commit 0a01e2e

Browse files
authored
Merge pull request #20 from taskiq-python/feature/docs
2 parents 31f39c5 + da7dc12 commit 0a01e2e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,17 @@ async def main():
4949
asyncio.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.

0 commit comments

Comments
 (0)