I am working on a POC on spring clodata flow using kafka binder. Getting below error on pushing the payload to kafka . This works fine in Rabbit MQ so wondering what change needs to be done to make it work in Kafka. As per spring cloud this message channel change should be seamless and no code changes needed to get it working.
ERROR 14088 --- [ctor-http-nio-4] o.s.k.support.LoggingProducerListener : Exception thrown when sending a message with key='null' and payload='{91, 91, 123, 34, 117, 112, 100, 97, 116, 101, 85, 115, 101, 114, 73, 100, 101, 110, 116, 105, 102, ...' to topic poctopic:
CODE SNIPPET TO SEND of KAFKA
public void sendToChannel(List<String> list,String name) {
MessageBuilder builder=MessageBuilder.withPayload(list.toString());
builder=builder.setHeader("SOURCE",name);
this.source.output().send(builder.build());
logger.info("successfully send payload to channel ");
}
POM ENTRY for the KAFKA BINDER
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>