producer:
image: juplo/spring-producer:1.0-SNAPSHOT
environment:
- producer.bootstrap-server: kafka:9092
- producer.client-id: producer
- producer.topic: test
+ juplo.producer.bootstrap-server: kafka:9092
+ juplo.producer.client-id: producer
+ juplo.producer.topic: test
consumer-1:
image: juplo/simple-consumer:1.0-SNAPSHOT
import java.time.Duration;
-@ConfigurationProperties(prefix = "producer")
+@ConfigurationProperties(prefix = "juplo.producer")
@Validated
@Getter
@Setter
-producer:
- bootstrap-server: :9092
- client-id: DEV
- topic: test
- acks: -1
- batch-size: 16384
- linger: 0
- compression-type: gzip
+juplo:
+ producer:
+ bootstrap-server: :9092
+ client-id: DEV
+ topic: test
+ acks: -1
+ batch-size: 16384
+ linger: 0
+ compression-type: gzip
management:
endpoint:
shutdown:
enabled: true
info:
kafka:
- bootstrap-server: ${producer.bootstrap-server}
- client-id: ${producer.client-id}
- topic: ${producer.topic}
- acks: ${producer.acks}
- batch-size: ${producer.batch-size}
- linger: ${producer.linger}
- compression-type: ${producer.compression-type}
+ bootstrap-server: ${juplo.producer.bootstrap-server}
+ client-id: ${juplo.producer.client-id}
+ topic: ${juplo.producer.topic}
+ acks: ${juplo.producer.acks}
+ batch-size: ${juplo.producer.batch-size}
+ linger: ${juplo.producer.linger}
+ compression-type: ${juplo.producer.compression-type}
logging:
level:
root: INFO
properties = {
"spring.kafka.bootstrap-servers=${spring.embedded.kafka.brokers}",
"spring.kafka.consumer.auto-offset-reset=earliest",
- "producer.bootstrap-server=${spring.embedded.kafka.brokers}",
- "producer.topic=" + TOPIC})
+ "juplo.producer.bootstrap-server=${spring.embedded.kafka.brokers}",
+ "juplo.producer.topic=" + TOPIC})
@AutoConfigureMockMvc
@EmbeddedKafka(topics = TOPIC, partitions = PARTITIONS)
@Slf4j