-
Notifications
You must be signed in to change notification settings - Fork 21
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] Configuration-based teleportation of signals #89
Comments
Questions (some of them are likely silly, but it's been a while since my head's really been in this space):
EVENT_BUS_AUTOSEND = [
STUDENT_REGISTRATION_COMPLETED,
SESSION_LOGIN_COMPLETED,
# etc.
] |
I'd love to hardcode the topic on the OpenEdxPublicSignal. We could auto-send everything (iterate over list of OpenEdxPublicSignal, attach receiver to each) but then we'd definitely need to work on #79 first. :-) |
FWIW, my hope would be that the bus implementation could derive a topic from the signal identifier, e.g. |
Ah, I see what you mean. Although if we went that route, would we really want the implementations doing it, or the abstraction layer on top of it (something in openedx-events)? |
I'm fine with doing that translation at the Kafka driver layer. In the worst case, there's a little extra duplication for different transports, and we can create that separate abstraction later. But I don't think we'll really know what would go in that middle layer until we have two or three of these. For instance, Redis streams doesn't really have partitioning, so it has to overload stream naming for that. That's a kind of mapping decision that's local to Redis's particular capabilities, and I don't think we need to make an abstraction layer for it. Honestly, I kind of hope that there's no middle abstraction layer at all–that everything can be done with just the in-process stuff in openedx-events, and then a separate kafka-aware library. I'd like to be able to run Kafka and Redis streams concurrently if necessary (for migration purposes), because neither of them know about the other. |
@rgraber I think this is completed as of openedx/edx-platform#33642 |
There are a couple of places where IDAs still call get_producer directly, but I've notified owners of that code and they can make the switch if they'd like. |
Currently, each IDA that wants to publish events must add a
@receiver
-decorated function that listens for a signal and calls the event-bus producer (specifying a topic and key-field as well). It would probably be better to instead have openedx-events do this automatically. Perhaps we could have settings like the following:The text was updated successfully, but these errors were encountered: