Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Abstraction] Configurable loading of Event Bus consumer implementation #147

Closed
timmc-edx opened this issue Nov 21, 2022 · 0 comments
Closed
Labels
event-bus Work related to the Event Bus.

Comments

@timmc-edx
Copy link
Contributor

timmc-edx commented Nov 21, 2022

We need a way to load event-bus consumer implementations based on configuration, so that IDAs aren't hardcoded to use one particular implementation. (See #87 for the producer side.)

There are a couple of ways we might go about this:

  • A. Define an abstract class in openedx-events, and load an implementing class based on Django settings, the same way we do with producers.
    • See commit message on main...timmc/load-consumer for open questions about what the interface might look like. (We also need to consider whether event-replay functionality would be included in this API.)
    • Here's what the implementation might look like in event-bus-kafka: openedx/event-bus-kafka@main...timmc/consumer-api
    • openedx-events could then be registered as a Django app, and offer a "consume events" management command that reads configuration and loads the appropriate implementation.
  • B. Just have every implementation make its own management command, requiring all of them to be registered in INSTALLED_APPS.
    • This moves the hardcoding from the IDA source code into the infrastructure source code.
    • Might be OK temporarily, but at some point we probably want community Helm charts or something and will not be happy with that hardcoding.
  • C. Are there other options? Should we support an entry point that isn't a management command?
@timmc-edx timmc-edx added the event-bus Work related to the Event Bus. label Nov 21, 2022
@timmc-edx timmc-edx added this to the [Event Bus] Future milestone Nov 21, 2022
timmc-edx added a commit to openedx/event-bus-kafka that referenced this issue Nov 21, 2022
This is part of openedx/openedx-events#147 and
is accompanied by branch `timmc/load-consumer` in openedx-events.
timmc-edx added a commit to openedx/event-bus-kafka that referenced this issue Nov 28, 2022
This is part of openedx/openedx-events#147 and
is accompanied by branch `timmc/load-consumer` in openedx-events.
@timmc-edx timmc-edx added the backlog To be put on a team's backlog or wishlist label Jan 19, 2023
@robrap robrap removed the backlog To be put on a team's backlog or wishlist label Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
event-bus Work related to the Event Bus.
Projects
None yet
Development

No branches or pull requests

2 participants