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
CAMEL-17658 camel-debezium: additionalProperties are trimmed #6960
CAMEL-17658 camel-debezium: additionalProperties are trimmed #6960
Conversation
Ah so are you saying the key in the map is a string with a dot? As if you did this in regular Java Map map = ... |
Yes, it is exacty the case. Value in the map is with dot ( |
The reason why it should work is fact, that it works in "non-specific debezium parent component (see https://github.com/apache/camel/blob/main/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumComponentTest.java#L48)" The difference is caused by the fact, that configurer is not used and the value is not trimmed. Therefore I think it should work in the same way with configurer. |
that test is a bit wrong as the component should be started (or init) before creating the endpoint so the component can prepare itself and setup its configurer |
@davsclaus Do you mean the test for "non-specific debezum component" https://github.com/apache/camel/blob/main/components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/test/java/org/apache/camel/component/debezium/DebeziumComponentTest.java#L48 ? In that case I have no argument that we want this behavior during automatic configuration. I can fix problem in component itself (not changing |
Yeah its a tricky code the property binding - let me try your patch. |
Your code is correct, the newName should include the remainder parts - this is the first time we hit this because of the dot keys in that component. |
Its a bit tough to build an unit test in camel-core as this requires having configurers and whatnot |
Issue: https://issues.apache.org/jira/browse/CAMEL-17658
Problem is caused not entirely by debezium component. Automatic properties configuration can "trim" property in specific cases.
@UriParam(label = "common", prefix = "map.", multiValue = true,
. Automatic configuration initialization will detect a HashMap object as a map property, but then it executes "set property A=value into HashMap (and property B is ignored)"I'm not sure whether this change could be approved, Therefore this is only draft and I'd like to see whether there will be some failing tests.
In case that this approach is not desired or potentially dangerous, I will fix it directly on debezium components - which is safe.