-
Notifications
You must be signed in to change notification settings - Fork 5
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: emit original headers with message #122
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rgraber
force-pushed
the
rsgraber/20230126-pass-real-time-along
branch
from
January 31, 2023 14:33
4c13fc1
to
6d806b0
Compare
rgraber
force-pushed
the
rsgraber/20230126-pass-real-time-along
branch
from
January 31, 2023 20:40
d148a01
to
1ed35c4
Compare
…ub.com/openedx/event-bus-kafka into rsgraber/20230126-pass-real-time-along
rgraber
changed the title
Rsgraber/20230126 pass real time along
feat: emit original headers with message
Feb 1, 2023
timmc-edx
reviewed
Feb 1, 2023
timmc-edx
reviewed
Feb 2, 2023
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.
A few small things, but looks good overall!
timmc-edx
approved these changes
Feb 2, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: openedx/openedx-events#162
Pass all EventsMetadata fields as headers when producing an event to Kafka. The consumer takes these headers and emits the signal with the original metadata, as reconstructed from the message headers.
To prevent the need for lock-step upgrades, all headers except event type and id are considered optional. If not passed, we will just use the default value in EventsMetadata. This is why _get_metadata_from_headers returns and EventsMetadata object instead of just a dictionary of kwargs to pass to
send_event_with_custom_metadata
.We can make another ticket to make the other headers mandatory after and possibly rethink what _get_metadata_from_headers returns.
Merge checklist:
Check off if complete or not applicable: