This repository was archived by the owner on Apr 30, 2025. It is now read-only.
Use topic from message in metadata#143
Open
jeantessier wants to merge 1 commit into
Open
Conversation
Metadata by default has the topic from the listener. If the listener uses a regex to listen to multiple topics, the topic in the metadata ends up being the regex, and not the actual topic of the message. This makes is impossible to have a listener subscribe to multiple topics but fine tune the behavior based on the actual topic on which the message came. For instance, an indexing service might look for updates on multiple topics, but needs to know the actual topic to adjust the right index. The underlying message from the Kafka library has the actual topic. We can use it to populate the metadata.
|
Code Climate has analyzed commit eec7e65 and detected 0 issues on this pull request. View more on Code Climate. |
Author
|
Duplicate of #136 |
Member
|
@dorner seems like CI is not working. Migrate from travis to github actions? |
Contributor
|
@klippx it's been on my backlog for a while... unfortunately I haven't had a chance to get to it yet. :( |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Metadata by default has the topic from the listener. If the listener
uses a regex to listen to multiple topics, the topic in the metadata
ends up being the regex, and not the actual topic of the message. This
makes is impossible to have a listener subscribe to multiple topics but
fine tune the behavior based on the actual topic on which the message
came.
For instance, an indexing service might look for updates on multiple
topics, but needs to know the actual topic to adjust the right index.
The underlying message from the Kafka library has the actual topic.
We can use it to populate the metadata.