Skip to main content

Kafka操作工具。

Project description

使用手册

快速开始

1)生产者

import kafkaplus

producer = kafkaplus.getProducer("localhost:9092")
# 发送一条消息
producer.send("test_topic", "data-a")

# 同步发送一条消息
producer.sendSync("test_topic", "data-b")

# 批量发送消息
producer.sendBatch("test_topic", "data1", "data2", "data3")

2)消费者

import kafkaplus

# 接收消息的回调函数
def callback(data, **kwargs):
    print(data)
    print(kwargs)

consumer = kafkaplus.getConsumer("localhost:9092")
# 监听topic,使用回调函数处理消息
consumer.onListener("test_topic",group="G-test",callback=callback)

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

kafkaplus-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

kafkaplus-0.0.1-py3.9.egg (6.4 kB view details)

Uploaded Egg

kafkaplus-0.0.1-py2.py3-none-any.whl (3.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kafkaplus-0.0.1.tar.gz.

File metadata

  • Download URL: kafkaplus-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for kafkaplus-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1ab0625dcc74b95f79ad79711772ed6c85c8cfe1f97ac7dd893b2b7d3af849f2
MD5 9d34395e4ab9c51be8d7133b15eed708
BLAKE2b-256 5649920e0f5dcd358f2cc89adf1644715d43171c03226ba31549b9cbdd2d25cc

See more details on using hashes here.

File details

Details for the file kafkaplus-0.0.1-py3.9.egg.

File metadata

  • Download URL: kafkaplus-0.0.1-py3.9.egg
  • Upload date:
  • Size: 6.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for kafkaplus-0.0.1-py3.9.egg
Algorithm Hash digest
SHA256 f1cb2f464788e80f5dcada073db85312aed9ce5b2bcd4e2c7330b0578dc812de
MD5 d9c6540e02f879716a5ba8176352d6e2
BLAKE2b-256 a7247763020cccd32322ffa2e99d3f1e9d5f205d1ab872e3ef7111dd57c8ad41

See more details on using hashes here.

File details

Details for the file kafkaplus-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: kafkaplus-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for kafkaplus-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8a362238d9d9e35b78da104e2c6bb141cdc2550fdc6117edc9595f853aad5fda
MD5 849973357dfcc9e8398a1f79bdc0612d
BLAKE2b-256 76b49e69af080331e52fbdd5529c1e76185ff1534e35d7df3430c7be58ffd5a5

See more details on using hashes here.

Supported by

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