Python client for Strimzi Kafka Bridge
Project description
kafka-bridge-client
Python async client for Strimzi Kafka Bridge and Confluent REST Proxy Package include consumer only.
Install
pip install kafka-bridge-client
Usage
By default client use Strimzi Kafka Bridge API
Consumer (async)
from kafka_bridge_client import KafkaBridgeConsumer
# Strimzi Kafka Bridge
consumer1 = KafkaBridgeConsumer(
'topic1',
'topic2',
group_id='my-group,
auto_offset_reset='earliest',
enable_auto_commit=False,
bootstrap_server='your-kafka-bridge-url',
consumer_name='consumer-name',
)
# Confluent REST Proxy
consumer2 = KafkaBridgeConsumer(
'topic1',
'topic2',
group_id='my-group,
auto_offset_reset='earliest',
enable_auto_commit=False,
bootstrap_server='your-kafka-bridge-url',
consumer_name='consumer-name',
proxy='confluent'
)
async for rec in consumer1.get_records():
print(rec['value'])
await consumer.commit()
Producer (sync)
from kafka_bridge_client import KafkaBridgeProducer
producer = KafkaBridgeProducer('http://bridge.url' timeout=5)
producer.send(Message(key='1', value='value'))
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for kafka-bridge-client-0.3.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0117ed8d4a2fe95ff79b8bc838c73d7df01e71b46118719eb1caa353e21b1255 |
|
MD5 | d2246d06761007639b9786b533e1772c |
|
BLAKE2b-256 | e0e90fd7b25161b7883fc0cd814631a46e222f80a8577ee4ad25bbf7abe311d5 |
Close
Hashes for kafka_bridge_client-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33d43d913b1840c1adf6232f8cc0588e13f1079602b9416029171cb3a2f27153 |
|
MD5 | fd699b60b6a4e61ed041d939d17c815d |
|
BLAKE2b-256 | 3bc5a58fea574be32abe47a662cadee17c62b941ca46ea50c6ce0222a594c541 |