Registry / workflow / edx-event-bus-kafka

edx-event-bus-kafka

JSON →
library6.1.0pypypiunverified

Kafka implementation for Open edX event bus. Provides Kafka producer/consumer for publishing and consuming Open edX events. Current version 6.1.0 (supports Django 5.2, Python >=3.8). Release cadence: irregular, ~5-10 releases per year.

pip install edx-event-bus-kafka
INSTALL
IMPORT
SIG · EDX-EVENT-BUS-KAFK
E
edx-event-bus-kafka
workflowpythonv6.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

KafkaEventProducer
✓ from edx_event_bus_kafka import KafkaEventProducer
✗ from edx_event_bus_kafka import KafkaEventProducer

Basic produce and consume example.

from edx_event_bus_kafka import get_producer, create_consumer # Producer example producer = get_producer( topic='my-topic', event_type='org.openedx.learning.course.enrollment.completed.v1', ) producer.send({ 'user_id': 123, 'course_key': 'course-v1:edX+DemoX+Demo_Course', }) # Consumer example consumer = create_consumer( topic='my-topic', group_id='my-group', ) for message in consumer: print(message.value)
Debug
Known issues
breakingVersion 6.0.0 dropped Python 3.8 support. Upgrade to Python 3.9+.
fix
Use Python 3.9, 3.10, 3.11, or 3.12 (3.12 supported since v6.0.0).
affects: >=6.0.0
deprecatedThe module 'edx_event_bus_kafka.internal' is private and should not be imported directly. Breaking changes may occur without notice.
fix
Use public API: KafkaEventProducer, KafkaEventConsumer, get_producer, create_consumer.
affects: all
gotchaConsumer must be iterated (for message in consumer:) or it will not poll. Calling consumer.poll() manually is not supported in the current API.
fix
Use iteration pattern: for message in consumer: ...
affects: all
gotchaTopic names often require a specific prefix (e.g., 'edx.') depending on the Open edX deployment. Check your platform's configuration.
fix
Consult your Open edX instance's event bus configuration for topic naming conventions.
affects: all
deprecatedThe setting EVENT_BUS_KAFKA_ENABLED is being phased out; configuration now uses SERVICE_VARIANT and other Django settings.
fix
Configure via EVENT_BUS_PRODUCER_CONFIG and EVENT_BUS_CONSUMER_CONFIG in Django settings.
affects: >=6.0.0
Upgrade
Version history
6.1.0latest on PyPI · released Apr 11, 2025
Audit
Dependencies
openedx-eventsrequiredRequired for event definitions and serialization.
djangorequiredUsed by Open edX; event bus integrates with Django settings.
aiokafkarequiredAsync Kafka client.
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
edx-event-bus-kafka — pip install edx-event-bus-kafka · libregistry