feat: make CDC message key serialization configurable#52
Merged
Conversation
e9ca54a to
6cd2cf1
Compare
fbiville
commented
Jan 9, 2024
source-connector/src/test/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcSourceNodesIT.kt
Outdated
Show resolved
Hide resolved
fbiville
commented
Jan 10, 2024
| .putCdcParameters("neo4j.cdc.topic.%s.patterns.%s.changesTo", cdcChangesTo) | ||
| .putCdcPatterns(cdcPatterns, cdcPatternsIndexed) | ||
| .putCdcMetadata(cdcMetadata) | ||
| .putCdcKeySerializations("neo4j.cdc.topic.%s.key-strategy", cdcKeySerializations) |
Contributor
Author
There was a problem hiding this comment.
strictly speaking, all these putCdcXxx should be conditional, but I don't think it's worth the effort here
6beef75 to
1b8bfa3
Compare
fbiville
commented
Jan 11, 2024
...ce/src/test/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcKeySerializationStrategyTest.kt
Show resolved
Hide resolved
fbiville
commented
Jan 11, 2024
| return this | ||
| } | ||
|
|
||
| @Deprecated(message = "redundant API", replaceWith = ReplaceWith("assertMessageValue")) |
Contributor
Author
There was a problem hiding this comment.
up for discussion but I think we can keep the assertXxx and migrate the existing expectXxx calls in another PR?
ali-ince
reviewed
Jan 12, 2024
legacy-connectors/src/test/kotlin/streams/kafka/connect/source/LegacyNeo4jSourceIT.kt
Outdated
Show resolved
Hide resolved
...nector/src/test/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcSourceKeySerializationIT.kt
Outdated
Show resolved
Hide resolved
source-connector/src/test/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcSourceNodesIT.kt
Outdated
Show resolved
Hide resolved
source/src/main/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcKeySerializationStrategy.kt
Outdated
Show resolved
Hide resolved
source/src/main/kotlin/org/neo4j/connectors/kafka/source/SourceConfiguration.kt
Outdated
Show resolved
Hide resolved
...ce/src/test/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcKeySerializationStrategyTest.kt
Show resolved
Hide resolved
| return this | ||
| } | ||
|
|
||
| @Deprecated(message = "redundant API", replaceWith = ReplaceWith("assertMessageValue")) |
dd4924b to
f69c966
Compare
fbiville
commented
Jan 12, 2024
| ): KafkaConsumer<String, GenericRecord> { | ||
| val consumer = KafkaConsumer<String, GenericRecord>(properties) | ||
| ): KafkaConsumer<*, GenericRecord> { | ||
| val consumer = KafkaConsumer<Any, GenericRecord>(properties) |
Contributor
Author
There was a problem hiding this comment.
not pretty, but I'm not sure we can do better (none of the generic types really matter here anyway)
1d36a31 to
30bb3c4
Compare
ali-ince
approved these changes
Jan 18, 2024
Contributor
ali-ince
left a comment
There was a problem hiding this comment.
Just a nit, otherwise looks good to me.
| var current = this | ||
| path.split('.').forEach { current = current.field(it).schema() } | ||
| return current | ||
| return path.split('.').fold(this) { schema, field -> schema.field(field).schema() } |
source/src/main/kotlin/org/neo4j/connectors/kafka/source/Neo4jCdcTask.kt
Outdated
Show resolved
Hide resolved
0cf75f0 to
ca6c521
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.