Skip to main content

Kafka integration for bluesky.

Project description

https://img.shields.io/travis/bluesky/bluesky-kafka.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

Release History

v0.3.0 (2020-09-03)

  • added BlueskyConsumer

  • added MongoConsumer

  • added supervisor configuration file for mongo_normalized_consumer.py

  • rewrote RemoteDispatcher to use BlueskyConsumer

  • changed default serialization method to MessagePack

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

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.3.0.tar.gz (34.5 kB view details)

Uploaded Source

Built Distribution

bluesky_kafka-0.3.0-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bluesky-kafka-0.3.0.tar.gz
  • Upload date:
  • Size: 34.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for bluesky-kafka-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4a8c3df41b39069f63f5e7aec82f098a173644b18e60213367c9091840e0f7d5
MD5 7beefd32c02b8258907d17d55b537ff3
BLAKE2b-256 56711997a032236dcba798da30f939260b629c4919e798cbf9f6b38d966acaf3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bluesky_kafka-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0.post20200714 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.3

File hashes

Hashes for bluesky_kafka-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38caebdc2e166d79d40b609306a0b438faee1cbb6b45c93029639a2b49600f5a
MD5 c0bfd41b3979590642cdd22d5341fe8e
BLAKE2b-256 9c6d061d27aa5db55973a07b41a2e4ff09ec81be59f8cf012ef20f38a128f2cc

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