Skip to content

feat: make CDC message key serialization configurable#52

Merged
fbiville merged 13 commits intomainfrom
source-key-configuration
Jan 22, 2024
Merged

feat: make CDC message key serialization configurable#52
fbiville merged 13 commits intomainfrom
source-key-configuration

Conversation

@fbiville
Copy link
Contributor

@fbiville fbiville commented Jan 5, 2024

No description provided.

@fbiville fbiville force-pushed the source-key-configuration branch 3 times, most recently from e9ca54a to 6cd2cf1 Compare January 9, 2024 17:23
@neo4j neo4j deleted a comment from neo4j-build-service Jan 9, 2024
@neo4j-build-service
Copy link

neo4j-build-service commented Jan 9, 2024

Warnings
⚠️ ❗ Please include a description of your PR changes.

Pull request should have a description of the underlying changes.

Generated by 🚫 dangerJS against 54fdde0

.putCdcParameters("neo4j.cdc.topic.%s.patterns.%s.changesTo", cdcChangesTo)
.putCdcPatterns(cdcPatterns, cdcPatternsIndexed)
.putCdcMetadata(cdcMetadata)
.putCdcKeySerializations("neo4j.cdc.topic.%s.key-strategy", cdcKeySerializations)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

strictly speaking, all these putCdcXxx should be conditional, but I don't think it's worth the effort here

@fbiville fbiville force-pushed the source-key-configuration branch 2 times, most recently from 6beef75 to 1b8bfa3 Compare January 11, 2024 16:56
return this
}

@Deprecated(message = "redundant API", replaceWith = ReplaceWith("assertMessageValue"))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

up for discussion but I think we can keep the assertXxx and migrate the existing expectXxx calls in another PR?

Copy link
Contributor

Choose a reason for hiding this comment

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

fine by me

@fbiville fbiville marked this pull request as ready for review January 11, 2024 16:59
@fbiville fbiville requested a review from a team as a code owner January 11, 2024 16:59
return this
}

@Deprecated(message = "redundant API", replaceWith = ReplaceWith("assertMessageValue"))
Copy link
Contributor

Choose a reason for hiding this comment

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

fine by me

@fbiville fbiville force-pushed the source-key-configuration branch 2 times, most recently from dd4924b to f69c966 Compare January 12, 2024 16:35
): KafkaConsumer<String, GenericRecord> {
val consumer = KafkaConsumer<String, GenericRecord>(properties)
): KafkaConsumer<*, GenericRecord> {
val consumer = KafkaConsumer<Any, GenericRecord>(properties)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not pretty, but I'm not sure we can do better (none of the generic types really matter here anyway)

@fbiville fbiville force-pushed the source-key-configuration branch from 1d36a31 to 30bb3c4 Compare January 12, 2024 17:02
@fbiville fbiville requested a review from ali-ince January 12, 2024 17:46
Copy link
Contributor

@ali-ince ali-ince left a comment

Choose a reason for hiding this comment

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

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() }
Copy link
Contributor

Choose a reason for hiding this comment

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

👌

@fbiville fbiville force-pushed the source-key-configuration branch from 0cf75f0 to ca6c521 Compare January 19, 2024 10:57
@fbiville fbiville merged commit bf2e1c4 into main Jan 22, 2024
@fbiville fbiville deleted the source-key-configuration branch January 22, 2024 09:29
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.

3 participants