-
Notifications
You must be signed in to change notification settings - Fork 14
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
spring-kafka: ser/de #658
Merged
Merged
spring-kafka: ser/de #658
Conversation
This file contains 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
osoykan
force-pushed
the
feature/ser-de
branch
3 times, most recently
from
November 28, 2024 16:40
a6f0386
to
afcac98
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #658 +/- ##
==========================================
- Coverage 83.14% 82.21% -0.93%
==========================================
Files 85 85
Lines 2462 2508 +46
Branches 143 161 +18
==========================================
+ Hits 2047 2062 +15
- Misses 316 346 +30
- Partials 99 100 +1 ☔ View full report in Codecov by Sentry. |
osoykan
force-pushed
the
feature/ser-de
branch
from
November 29, 2024 09:02
1a6da71
to
58624c4
Compare
osoykan
force-pushed
the
feature/ser-de
branch
from
November 29, 2024 14:17
9858527
to
3f53cff
Compare
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.
This pull request includes several changes to improve the serialization mechanism and enhance the Spring Kafka testing infrastructure. It is one of the works that need to be done to improve serialization support when users want to use Protobuf, Avro, JSON(already supported), and other serialization systems.
Most notable change is the change for
TestSystemKafkaInterceptor<*,*>
. The dependency for this class was an ObjectMapper instance that you can provide through bean provider/Spring-Boot DI, but now it relies onStoveSerde<T, K>
interface, hence users can replace it with their ser/de choices. I have written a test to prove the approach is working, take a look, ProtobufSerdeKafkaSystemTest.kt.Improvements to serialization mechanism:
examples/spring-example/src/test/kotlin/com/stove/spring/example/e2e/TestSystemInitializer.kt
: AddedStoveSerde.jackson.anyByteArraySerde()
bean to the test system dependencies.gradle/libs.versions.toml
: Updated thekotlinx-serialization
library to includejson
andprotobuf
modules. [1] [2]lib/stove-testing-e2e/build.gradle.kts
: Changed thekotlinx.serialization
dependency tokotlinx.serialization.json
.Enhancements to Kafka testing infrastructure:
starters/spring/stove-spring-testing-e2e-kafka/build.gradle.kts
: Added Protobuf plugin and related dependencies for Kafka streams. [1] [2]starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/Extensions.kt
: ReplacedObjectMapper
withStoveSerde
for message serialization.starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/KafkaSystem.kt
: Added support for Kafka admin operations and improved the message publishing mechanism usingStoveSerde
.Codebase simplifications:
examples/spring-streams-example/build.gradle.kts
: Replacedkafka-streams.registry
withkafka-streams.protobuf.serde
.starters/spring/stove-spring-testing-e2e-kafka/src/main/kotlin/com/trendyol/stove/testing/e2e/kafka/MessageStore.kt
: Updated theMessageStore
class to use simplified message types.Adresses #560