-
Notifications
You must be signed in to change notification settings - Fork 179
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
KafkaCompanion does not configure Serializer/Deserializer #2756
Comments
…r not being initialized.
…gure the (de)serializers before creating the KafkaConsumer/KafkaProducer instances.
@diversit Thank you for opening this detailed issue and the PR. This was intentional, following the typical Kafka client behavior. That being said, I think configure could've called the for creators from registered serde. Would that make sense for you ? |
@ozangunalp Thanks for your reply. I understand your point. I was in the understanding the SerDe would required configuration provided by the From the docs registering custom serdes I had not understood I had to configure the SerDe myself. Could you please point me to the Javadoc note your mentioned? After better reading the docs of So I guess this issue can be closed then. |
You can access the javadoc from here : https://javadoc.io/doc/io.smallrye.reactive/smallrye-reactive-messaging-kafka-test-companion/latest/io/smallrye/reactive/messaging/kafka/companion/ConsumerBuilder.html
If you use the KafkaCompanionResource it is done in here : https://github.com/quarkusio/quarkus/blob/50f2d3f1bd14b0b8f518d8d346422e0dc7199898/test-framework/kafka-companion/src/main/java/io/quarkus/test/kafka/KafkaCompanionResource.java#L28 |
The
KafkaCompanion
does not properly configure a registeredSerde
,Serializer
and/orDeserialiser
which causes issues with certain implementations.E.g. When using Confluents
io.confluent.kafka.streams.serdes.avro.SpecificAvroSerde
(and it's serializer/deserializer) not properly callingconfigure
causes a test to fail with:This behaviour can be verified by adding a test case to
SerdesTest
:which will currently fail with
KafkaCompanion
should be updated to callconfigure
on theSerde
so the Serializer and Deserialiser properly get configured before a message is published or consumed.Due to this issue, other serialisers like the
StringSerializer
,UUIDSerializer
,ListSerializer
, etc could also give unexpected results in tests.Provided a fix in PR #2757
The text was updated successfully, but these errors were encountered: