-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: Configurable loading of event bus producer #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally right direction. Just digging into details.
""" | ||
|
||
@abstractmethod | ||
def send( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming that this replaces the previously documented send_to_event_bus
, since this would probably result in code like event_bus.send(...)
?
Related, do we like using the term send
rather than produce
, to provide overlap with the signals, since this takes a signal? Or would something like produce_from_signal
be more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong opinion! But yeah, it seemed redundant to use the existing name.
Hi @timmc-edx! Just checking to see if you are planning to proceed with this PR? |
Yep! This work was deprioritized and has bit-rotted a bit, but I'll be revisiting it. |
@timmc-edx: We have #87 which mentions wip PRs. You are welcome to close the PRs and verify the issue would help someone find them when and if the work is picked up. That said, do whatever feels right. |
66ffb75
to
5af0278
Compare
I pushed up something of a rewrite of the loader code. It may be that some of it should get pushed into an |
b239dc1
to
ffdb72c
Compare
This is ready for review again, and is accompanied by openedx/event-bus-kafka#14 I'm a little unsure about what the consumer API should look like, and it might be better to move that to a new PR later. It might be better to just focus on the producer part right now. |
@timmc-edx: I think we decided we would close/defer this? We could create a separate issue, or just use this PR as the issue, if you are ok with long-standing PRs. We should add backlog label and move to Future milestone, if you agree with status. Thanks! |
This defines an API for IDAs to use when producing events that allows the choice of Event Bus implementation to be configured rather than written in code. Implementations can document the appropriate setting for deployers to use. Caching the producer instance means that we automatically get a long-lived instance without the implementation itself having to perform caching itself.
a5cedbe
to
7ccd50c
Compare
This one is just for loading of the implementation -- and for now, scoped down to just the producing side. I'm moving the consumer side into a separate branch for later consideration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is worth a small how-to with examples of the kinds of things you might put in the EVENT_BUS_PRODUCER setting. The how-to could basically copy the setting description but I think a how-to would be a more accessible place for it.
Remove use of `UserWarning`, as it is the default.
@rgraber Hmm. I feel like it wouldn't be that helpful to give an example of the setting without backing code. The producer setting already gives an example of |
I think coming back once that PR is merged makes sense |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
OK, I'll add a ticky box for that on the issue. |
This defines an API for IDAs to use when producing events that allows the
choice of Event Bus implementation to be configured rather than written in
code. Implementations can document the appropriate setting for deployers
to use.
Caching the producer instance means that we automatically get a
long-lived instance without the implementation itself having to
perform caching itself.
This is part of #87
Merge checklist: