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

enhancement(kafka source): Support Kafka headers in Kafka source #7030

Merged
merged 9 commits into from
Apr 8, 2021

Conversation

jszwedko
Copy link
Member

@jszwedko jszwedko commented Apr 7, 2021

Brings #6815 up-to-date with master.

daniilguit and others added 9 commits March 20, 2021 00:00
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
Kafka header parsing tweaks

Co-authored-by: Bruce Guenter <bruce@untroubled.org>
Signed-off-by: Daniil Gitelson <daniil.guit@gmail.com>
@jszwedko jszwedko requested review from a team, prognant and bruceg and removed request for a team April 7, 2021 00:33
Copy link
Contributor

@prognant prognant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To the best of my knowledge it looks good to me with the minor remark regarding the empty headers scenario.

}
}
}
log.insert(headers_key, Value::from(headers_map));
Copy link
Contributor

@prognant prognant Apr 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will add a new field even if headers_map is empty. If that's the case I would say we should avoid it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 I could see it either way. I think it is nice to have headers consistently defined for all events, even if they don't have headers, than conditionally leave out that field.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@prognant do you feel strongly about it? Otherwise my preference is to leave it so that it is consistently defined for all events coming from Kafka.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, consistently having the field set, even with an empty value, could make sense, anyway I lack experience on the desired behaviour in such circumstances, so I better trust your judgement there 👍

Copy link
Member

@bruceg bruceg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jszwedko jszwedko merged commit 6c0df56 into master Apr 8, 2021
@jszwedko jszwedko deleted the daniilguit-master branch April 8, 2021 16:48
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.

4 participants