edx_event_bus_kafka.management.commands package#

Submodules#

edx_event_bus_kafka.management.commands.produce_event module#

Produce a single event. Intended for testing.

Implements required APP.management.commands.*.Command structure.

class edx_event_bus_kafka.management.commands.produce_event.Command(stdout=None, stderr=None, no_color=False, force_color=False)#

Bases: BaseCommand

Management command to produce a test event to the event bus.

add_arguments(parser)#

Entry point for subclassed commands to add custom arguments.

handle(*args, **options)#

The actual logic of the command. Subclasses must implement this method.

help = '\n    Produce a single test event with the given data to the specified Kafka topic.\n\n    example:\n        python3 manage.py cms produce_event --signal openedx_events.learning.signals.SESSION_LOGIN_COMPLETED           --topic user-login --key-field user.pii.username           --data \'{"user": {\n                    "id": 123,\n                    "is_active": true,\n                    "pii": {"username": "foobob", "email": "bob@foo.example", "name": "Bob Foo"}}}\'\n    '#

Module contents#

Management commands for the Kafka implementation.

(Django requires this package structure.)