Skip to content

Commit 9c0f526

Browse files
committed
Updated README to latest changes
1 parent c179375 commit 9c0f526

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@ async def test() -> None:
1313
print("The best task ever!")
1414
```
1515

16+
## Non-obvious things
17+
18+
You can configure kafka producer and consumer with special methods `configure_producer` and `configure_consumer`.
19+
Example:
20+
```python
21+
from taskiq_aio_kafka import AioKafkaBroker
22+
23+
broker = AioKafkaBroker(bootstrap_servers="localhost")
24+
25+
# configure producer, you can set any parameter from
26+
# base AIOKafkaProducer, except `loop` and `bootstrap_servers`
27+
broker.configure_producer(request_timeout_ms=100000)
28+
29+
# configure consumer, you can set any parameter from
30+
# base AIOKafkaConsumer, except `loop` and `bootstrap_servers`
31+
broker.configure_consumer(group_id="the best group ever.")
32+
```
33+
1634
## Configuration
1735

1836
AioKafkaBroker parameters:

0 commit comments

Comments
 (0)