-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Conversation
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>
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.
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)); |
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.
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.
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.
🤔 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.
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.
@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.
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.
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 👍
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.
LGTM
Brings #6815 up-to-date with master.