sam
sam

Reputation: 141

Kafka serialize-deserialize issue

We are using java configuration for producer to achieve asynchronous retry mechanism

and on the consumer side we are using message driven adapter(xml configuration).

identify that in the producer side we have

props.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,MessageSerializer.class.getName());

on producer ,we dont have option for setting the encoder implementation as it only support the serializer interface implementation

MessageSerializer implements Serializer

and on the consumer side we don't have deserialize option as it only support decoder interface implementation:

 <int-kafka:message-driven-channel-adapter

               id="inAdapter"
               channel="fromKafka"
               connection-factory="connectionFactory"
               key-decoder="kafkaKeyDecoder"
               payload-decoder="kafkaDecoder"                              
               topics="${topic.list}"
               offset-manager="offsetManager"/>

kafkaDecoder implements Decoder

Therfore getting error during serialization,can you please suggest on how to handle this.

Upvotes: 0

Views: 340

Answers (1)

Gary Russell
Gary Russell

Reputation: 174769

You are using an old version of spring-integration-kafka; it is not configured that way anymore; the current version is 2.1.0 and it sits on top of spring-kafka 1.1.2.

The integration components are documented in the spring-kafka reference. Configuring Spring Kafka itself is elsewhere in that book.

Upvotes: 1

Related Questions