Thanks to visit codestin.com
Credit goes to github.com

Skip to content
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
phobos:masterfrom
jeantessier:use-topic-name-from-message
Open

Use topic from message in metadata#143
jeantessier wants to merge 1 commit into
phobos:masterfrom
jeantessier:use-topic-name-from-message

Conversation

@jeantessier

Copy link
Copy Markdown

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.

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.
@qlty-cloud-legacy

Copy link
Copy Markdown

Code Climate has analyzed commit eec7e65 and detected 0 issues on this pull request.

View more on Code Climate.

@jeantessier

Copy link
Copy Markdown
Author

Duplicate of #136

@klippx

klippx commented Nov 7, 2021

Copy link
Copy Markdown
Member

@dorner seems like CI is not working. Migrate from travis to github actions?

@dorner

dorner commented Nov 8, 2021

Copy link
Copy Markdown
Contributor

@klippx it's been on my backlog for a while... unfortunately I haven't had a chance to get to it yet. :(
@jeantessier this looks good to me but I think we should have a CI test set up before merging anything new. I'll try to work on it but I don't have a timeline right now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants