@Bean
public MessageConverter avroMessageConverter() throws IOException {
AvroSchemaMessageConverter converter = new AvroSchemaMessageConverter(MimeType.valueOf("avro/bytes"));
- converter.setSchemaLocation(new ClassPathResource("schemas/User.avro"));
+ //converter.setSchemaLocation(new ClassPathResource("schemas/User.avro"));
return converter;
}
}
springframework: info
ROOT: info
-spring:
- main:
- banner-mode: "off"
-
kafka:
topic: test
messageKey: keyTest
-
-
-# *************************** BINDERS CONFIGURATION ***************************
spring:
+ main:
+ banner-mode: "off"
cloud:
stream:
bindings:
partitioned: false
headerMode: raw
maxAttempts: 3
- backOffInitialInterval:
+ backOffInitialInterval: 1000
instanceCount: 1
instanceIndex: 0
kafka:
binder:
+ zkNodes: "kafka:2181"
brokers: "kafka:9092,kafka:9093,kafka:9094"
autoCreateTopics: true
<artifactId>spring-cloud-stream-schema</artifactId>
<version>1.1.1.RELEASE</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.avro</groupId>
+ <artifactId>avro</artifactId>
+ <version>1.8.1</version>
+ </dependency>
</dependencies>
<build>
<plugins>
spring:
main:
banner-mode: "off"
-
-
-
-# *************************** BINDERS CONFIGURATION ***************************
-spring:
cloud:
stream:
bindings:
instanceIndex: 0
kafka:
binder:
+ zkNodes: "kafka:2181"
brokers: "kafka:9092,kafka:9093,kafka:9094"
autoCreateTopics: true