Skip to content

Commit

Permalink
feat: add event bus and Kafka Django settings
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRoytman committed Sep 29, 2023
1 parent 8f81d1a commit 77ea87c
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions edx_exams/settings/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,15 @@
})

LMS_ROOT_URL = 'http://edx.devstack.lms:18000'

EVENT_BUS_PRODUCER = 'edx_event_bus_kafka.create_producer'
EVENT_BUS_CONSUMER = 'edx_event_bus_kafka.KafkaEventConsumer'
EVENT_BUS_KAFKA_SCHEMA_REGISTRY_URL = 'http://edx.devstack.schema-registry:8081'
EVENT_BUS_KAFKA_BOOTSTRAP_SERVERS = 'edx.devstack.kafka:29092'
EVENT_BUS_TOPIC_PREFIX = 'dev'

# The EVENT_BUS_PRODUCER_CONFIG Django setting introduced in openedx-events 8.6.0 does not work properly.
# In order to unblock development, EVENT_BUS_PRODUCER_CONFIG should be set to the empty object. Signal handlers
# should be added as before (i.e. versions <8.6.0).
# Once openedx-events 8.6.0 is corrected, this Django setting should be set.
EVENT_BUS_PRODUCER_CONFIG = {}
12 changes: 12 additions & 0 deletions edx_exams/settings/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,15 @@
# Lastly, see if the developer has any local overrides.
if os.path.isfile(join(dirname(abspath(__file__)), 'private.py')):
from .private import * # pylint: disable=import-error

EVENT_BUS_PRODUCER = 'edx_event_bus_kafka.create_producer'
EVENT_BUS_CONSUMER = 'edx_event_bus_kafka.KafkaEventConsumer'
EVENT_BUS_KAFKA_SCHEMA_REGISTRY_URL = 'http://edx.devstack.schema-registry:8081'
EVENT_BUS_KAFKA_BOOTSTRAP_SERVERS = 'edx.devstack.kafka:29092'
EVENT_BUS_TOPIC_PREFIX = 'dev'

# The EVENT_BUS_PRODUCER_CONFIG Django setting introduced in openedx-events 8.6.0 does not work properly.
# In order to unblock development, EVENT_BUS_PRODUCER_CONFIG should be set to the empty object. Signal handlers
# should be added as before (i.e. versions <8.6.0).
# Once openedx-events 8.6.0 is corrected, this Django setting should be set.
EVENT_BUS_PRODUCER_CONFIG = {}

0 comments on commit 77ea87c

Please sign in to comment.