Skip to main content

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 - custom kafka 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

taskiq_aio_kafka-0.2.1.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

taskiq_aio_kafka-0.2.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

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

Hashes for taskiq_aio_kafka-0.2.1.tar.gz
Algorithm Hash digest
SHA256 774c2d9a086124de11f4ec12a0b7dcf61a5079ceecf6d57710c763b3a1dbadf8
MD5 af880b2e72af4fbfb99b1897868d1dcf
BLAKE2b-256 8f3f6dc0eff02bfc53d58387a7e9d8db18c877d4a99afb9f05dd8935b8a9df89

See more details on using hashes here.

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

Hashes for taskiq_aio_kafka-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d9d291ed235df3f23efaa194aaa46147ea2b9d7349a0622a79c0054d582519d
MD5 dd74c3c3656b35ff4dc99c4fe19016bd
BLAKE2b-256 cb626ab1b93262ad74b34ffcb4ffd89b66127a32f0d133d622fee8bf25e147e2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page