Skip to main content

Kafka integration for bluesky.

Project description

https://github.com/bluesky/bluesky-kafka/actions/workflows/tests.yml/badge.svg https://img.shields.io/pypi/v/bluesky-kafka.svg

Kafka integration for bluesky.

  • Free software: 3-clause BSD license

Features

  • BlueskyConsumer

  • MongoConsumer

  • Publisher

  • RemoteDispatcher

Test

Install docker and docker-compose.

Start a Kafka server:

$ cd bluesky-kafka/scripts
$ sudo docker-compose -f bitnami-kafka-docker-compose.yml up

Run tests:

$ cd bluesky-kafka
$ pytest

Optionally increase logging output to the console by specifying a logging level:

$ pytest --log-cli-level=DEBUG

Run a Mongo Consumer Group

Create a conda environment:

$ conda create -n consumers python=3.8
$ conda activate consumers

Install packages:

$ pip install bluesky-kafka supervisor

Setup environment variables: mongo_uri reference: https://docs.mongodb.com/manual/reference/connection-string/ bootstrap_servers: comma-separated list of brokers.

$ export BLUESKY_MONGO_URI="mongodb://username:password@machine1:port1,machine2:port2,machine3:port3
$ export KAFKA_BOOTSTRAP_SERVERS="machine1:9092, machine2:9092, machine3:9092"

Update the bluesky_kafka/supervisor/supervisord.conf file with the correct path for your installation.

Start the consumer processes:

$ supervisord -c bluesky_kafka/supervisor/supervisord.conf

Monitor the consumer processes:

$ supervisorctl -c bluesky_kafka/supervisor/supervisorctl.conf

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

bluesky-kafka-0.8.0.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

bluesky_kafka-0.8.0-py3-none-any.whl (28.2 kB view details)

Uploaded Python 3

File details

Details for the file bluesky-kafka-0.8.0.tar.gz.

File metadata

  • Download URL: bluesky-kafka-0.8.0.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for bluesky-kafka-0.8.0.tar.gz
Algorithm Hash digest
SHA256 218e6d863f66e0f1e3cc871bc51d95018e6491389742ea1a317fd4b3125dfea5
MD5 b6a620014aa146fcd14b4ccb16902c10
BLAKE2b-256 329b66857a776f06270e3c0ba8233878c5558d0af88eca2d3cda572b3bf8f451

See more details on using hashes here.

File details

Details for the file bluesky_kafka-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: bluesky_kafka-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 28.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.11

File hashes

Hashes for bluesky_kafka-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9f93f5b4ea082734b7e7238d7738e9832aab7a6d123f6e35f8001e9a49ce3d85
MD5 74eabc988c6bea274d300214471c2f70
BLAKE2b-256 6c38b5ae902b012df6ce2c92445df760dd778328a9c1cb0be145c85e9b533ea0

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