1 package de.example.spring.kafka;
3 import org.springframework.cloud.stream.messaging.Source;
4 import org.springframework.context.annotation.Bean;
5 import org.springframework.context.annotation.Configuration;
8 public class SenderConfig {
11 public Sender sender(Source source) {
12 return new Sender(source);
16 // public MessageConverter customMessageConverter(ObjectMapper objectMapper) {
17 // MyCustomMessageConverter converter = new MyCustomMessageConverter();
18 // converter.setSerializedPayloadClass(String.class);
19 // if (objectMapper != null) {
20 // converter.setObjectMapper(objectMapper);
27 // public MessageConverter avroMessageConverter() throws IOException {
28 // AvroSchemaMessageConverter converter = new AvroSchemaMessageConverter(MimeType.valueOf("avro/bytes"));
29 // //converter.setSchemaLocation(new ClassPathResource("schemas/User.avro"));