Checks messages to avoid reprocessing events.
Project description
QuintoAndar Kafka Python Library
QuintoAndar's kafka-python lib wrapper with additional functionalities.
KafkaIdempotentConsumer
A simple wrapper for kafka-python lib that uses redis to check duplicate events.
Configuration
Name | Description |
---|---|
group_id | The consumer group id |
bootstrap_servers | The bootstrap servers |
redis_host | The topic to consume from |
redis_port | The function that processes the event |
idempotent_key | Function which extract an unique identifier from the event |
See examples
Development
Environment
At the bare minimum you'll need the following for your development environment:
It is strongly recommended to also install and use pyenv:
This tool eases the burden of dealing with virtualenvs and having to activate and
deactivate'em by hand. Once you run pyenv local my-project-venv
the directory you're
in will be bound to the my-project-venv
virtual environment and then you will have
never to bother again activating the correct venv.
Getting Started
1. Clone the project:
git clone git@github.com:quintoandar/kafka-python.git
cd kafka-python
2. Setup the python environment for the project:
make environment
3. Install dependencies
You can just the make recipe:
make install
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
Hashes for quintoandar_kafka-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d897ea04b6ce5ff9b219b8c995bb34d09e4bd69bd2ae8fcf2b7c2adb507397d |
|
MD5 | 46f8068c533d5c4eec1c679e136c3f71 |
|
BLAKE2b-256 | 14b953920c92aa30e9f5c13df4fd820eac8306cefc580c1727626f878603720d |