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

feat: determine signal from message header #159

Merged
merged 1 commit into from
May 8, 2023

Conversation

rgraber
Copy link
Contributor

@rgraber rgraber commented May 5, 2023

Issue: openedx/openedx-events#78

When consuming events, determine the correct signal to use from the message header rather than an argument passed into the management command. This is a necessary step towards allowing multiple event types on a single topic.
Temporarily makes the signal argument optional so it can be safely removed from callers without needing a lockstep upgrade. After we are reasonably certain we have upgraded any processes using the management command, we can make the breaking change and do a major version upgrade.

Also, since Consumer.poll() may return a message with an error object, remove misleading documentation saying it can't. DeserializingConsumer turned those errors into exceptions but the plain Consumer will keep them as errors on the message.

@rgraber rgraber force-pushed the rsgraber/20230505-get-signal-from-headers branch from a8cf469 to 0bdef39 Compare May 5, 2023 17:52
@rgraber rgraber changed the title **Merge checklist:** Check off if complete *or* not applicable: - [ ] Version bumped - [ ] Changelog record added - [ ] Documentation updated (not only docstrings) - [ ] Commits are squashed - [ ] Noted any: Concerns, dependencies, deadlines, tickets, testing instructions feat!: determine signal from message header May 5, 2023
@rgraber rgraber force-pushed the rsgraber/20230505-get-signal-from-headers branch from a6f12e3 to e36dc45 Compare May 5, 2023 20:03
@rgraber rgraber changed the title feat!: determine signal from message header feat: determine signal from message header May 5, 2023
@rgraber rgraber marked this pull request as ready for review May 5, 2023 20:05
@rgraber rgraber merged commit b32aa42 into main May 8, 2023
@rgraber rgraber deleted the rsgraber/20230505-get-signal-from-headers branch May 8, 2023 17:22
rgraber pushed a commit that referenced this pull request May 8, 2023
When consuming events, determine the correct signal to use from the message header rather than an argument passed into the management command. This is a necessary step towards allowing multiple event types on a single topic.
Temporarily makes the signal argument optional so it can be safely removed from callers without needing a lockstep upgrade. After we are reasonably certain we have upgraded any processes using the management command, we can make the breaking change and do a major version upgrade.

Also, since Consumer.poll() may return a message with an error object, remove misleading documentation saying it can't. DeserializingConsumer turned those errors into exceptions but the plain Consumer will keep them as errors on the message.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants