Spring Kafka message conversion failing on Spring Boot 3.3 #3296
Replies: 1 comment
-
Thank you for the demo! It is a bit complicated, but I wrote this test to digest it:
I see what is going on.
Since your The release with that fix is due to next week: https://github.com/spring-projects/spring-kafka/milestone/244. Sorry, there is no workaround, unless you convert your Closed as |
Beta Was this translation helpful? Give feedback.
-
We just updated our spring boot project from
3.2.4
to3.3.0
and we faced some issues regarding the awesome libspring-kafka
. Our kafka listeners that areack-mode=record
and expecting as parameter a kafka json string message converted to a POJO stopped working as soon as we updated the version.While debugging the issue we noticed that the message comes as string if we use
ConsumerRecord<>
but where is expected the serialized POJO isnull
.Download demo project: https://uploadnow.io/f/r4XXkw9
Current stack when a message is published to the topic:
Project configuration
My best guess is that we're making some mistake on the deserialization configuration that we miraculously working until now because we use this lib in a non-tipical way. In our infra we have "many kafka brokers" and some applications needs to publish/consume from different brokers, so we have to create configuration for each one.
CUSTOM KAFKA PROPERTIES FOR ONE OF THE BROKERS
CONFIGURATION FOR ONE OF THE BROKERS
TOPIC LISTENER USING A CONTAINERFACTORY FROM ONE OF THE BROKERS
application.yaml
kafka-private-config.yaml
What I tried?
isConversionNeeded()
to betrue
but it seems that it tries to convert but also failsBeta Was this translation helpful? Give feedback.
All reactions