Navigation :
Kafka Source
note
DLC provides a default KafkaSourceDescription with the name defaultKafkaSourceDesc if you have not defined a Kafka source.
Configuration Properties
Properties for a Kafka Source are defined by name in the dlc.messaging.kafka namespace,
and are picked up as configurations for the DLC.
YAML Example
dlc:
messaging:
kafka:
sources:
MyKafkaSource:
topics-to-exclude:
- Topic1
topics-to-include:
- Topic2
accepts-topic-overrides: true
Java Configuration
KafkaSourceDescription Spring Beans are picked up as configurations for the DLC.
| Parameter |
Required |
Type |
Description |
| name |
Y |
String |
Name of the source. |
| topicsToInclude |
|
Set<String> |
Topics to include. See source to topic matching. |
| topicsToExclude |
|
Set<String> |
Topics to exclude. See source to topic matching. |
| acceptsTopicOverrides |
|
Boolean |
Whether this source is allowed to accept Topic Overrides in the Load Request. |
Java Example
@Bean
public KafkaSourceDescription kafkaSourceDescription(){
return KafkaSourceDescription.builder("KafkaSource")
.topicsToExclude(Set.of("Topic1"))
.topicsToInclude(Set.of("Topic2"))
.acceptsTopicOverrides(true)
.build();
}