From af43d29c480906cb6062bd1c65c9846803c3b270 Mon Sep 17 00:00:00 2001 From: Tim McCormack Date: Tue, 29 Nov 2022 14:23:59 +0000 Subject: [PATCH] docs: Use real example for `EVENT_BUS_PRODUCER` (#150) --- openedx_events/event_bus/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openedx_events/event_bus/__init__.py b/openedx_events/event_bus/__init__.py index c83a29bc..57bf88df 100644 --- a/openedx_events/event_bus/__init__.py +++ b/openedx_events/event_bus/__init__.py @@ -7,6 +7,8 @@ - ``get_producer`` returns an ``EventBusProducer`` singleton that should be used for sending all events to the Event Bus. The backing implementation is chosen via the Django setting ``EVENT_BUS_PRODUCER``. + See for example the Kafka implementation's ``KafkaEventProducer``, with the ``create_producer`` function + serving as the loader: https://github.com/openedx/event-bus-kafka/blob/main/edx_event_bus_kafka/internal/producer.py """ import warnings @@ -97,7 +99,7 @@ def send( # .. setting_description: String naming a callable (function or class) that can be called to create # or retrieve an instance of EventBusProducer when ``openedx_events.event_bus.get_producer`` is # called. The format of the string is a dotted path to an attribute in a module, e.g. -# ``some.module.path.EventBusImplementation``. This producer will be managed as a singleton +# ``edx_event_bus_kafka.create_producer``. This producer will be managed as a singleton # by openedx_events. If setting is not supplied or the callable raises an exception or does not return # an instance of EventBusProducer, calls to the producer will be ignored with a warning at startup.