Kafka broker for taskiq
Project description
AioKafka broker for taskiq
This lirary provides you with aiokafka broker for taskiq.
Usage:
from taskiq_aio_kafka import AioKafkaBroker
broker = AioKafkaBroker(bootstrap_servers="localhost")
@broker.task
async def test() -> None:
print("The best task ever!")
Non-obvious things
You can configure kafka producer and consumer with special methods configure_producer
and configure_consumer
.
Example:
from taskiq_aio_kafka import AioKafkaBroker
broker = AioKafkaBroker(bootstrap_servers="localhost")
# configure producer, you can set any parameter from
# base AIOKafkaProducer, except `loop` and `bootstrap_servers`
broker.configure_producer(request_timeout_ms=100000)
# configure consumer, you can set any parameter from
# base AIOKafkaConsumer, except `loop` and `bootstrap_servers`
broker.configure_consumer(group_id="the best group ever.")
Configuration
AioKafkaBroker parameters:
bootstrap_servers
- url to kafka nodes. Can be either string or list of strings.kafka_topic
- custom topic in kafka.result_backend
- custom result backend.task_id_generator
- custom task_id genertaor.kafka_admin_client
- customkafka
admin client.delete_topic_on_shutdown
- flag to delete topic on broker shutdown.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file taskiq_aio_kafka-0.2.1.tar.gz
.
File metadata
- Download URL: taskiq_aio_kafka-0.2.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 774c2d9a086124de11f4ec12a0b7dcf61a5079ceecf6d57710c763b3a1dbadf8 |
|
MD5 | af880b2e72af4fbfb99b1897868d1dcf |
|
BLAKE2b-256 | 8f3f6dc0eff02bfc53d58387a7e9d8db18c877d4a99afb9f05dd8935b8a9df89 |
File details
Details for the file taskiq_aio_kafka-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: taskiq_aio_kafka-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d9d291ed235df3f23efaa194aaa46147ea2b9d7349a0622a79c0054d582519d |
|
MD5 | dd74c3c3656b35ff4dc99c4fe19016bd |
|
BLAKE2b-256 | cb626ab1b93262ad74b34ffcb4ffd89b66127a32f0d133d622fee8bf25e147e2 |