Avro Topic

Configuration Properties

Properties for an Avro Topic are defined by name in the dlc.avro.topics namespace, and are picked up as configurations for the DLC.

Key Required Type Default Description
file-pattern String Path matcher.
schema-path String Path to schema.
column-names List<String> Columns will come from the store which is being published to Column of the file. You must specify all column names in the file. The ones that do not correspond to a matching column in the datastore are skipped.
channels Set<Channel> A channel is created using the topic’s name as the name of the target. Channels.
restrict-to-sources Set<String> Sources to which the topic is restricted.
restrict-from-sources Set<String> Sources from which the topic restricted.

YAML Example

dlc:
  avro:
    topics:
      Trades:
        file-pattern: trades*.avro
        schema-path: schemas/schema.avsc

Java Configuration

AvroTopicDescription Spring Beans are picked up as configurations for the DLC.

Parameter Required Type Default Description
name Y String Name of the topic.
filePattern String Path matcher.
schemaPath String Path to schema.
columnNames List<String> Columns will come from the store which is being published to Column of the file. You must specify all column names in the file. The ones that do not correspond to a matching column in the datastore are skipped.
channels Set<ChannelDescription> A channel is created using the topic’s name as the name of the target Channel Descriptions which belong to the topic.
restrictToSources Set<String> Sources to which topic is restricted.
restrictFromSources Set<String> Sources from which topic is restricted.

Java Example

@Bean
public AvroTopicDescription tradesTopic() {
    return AvroTopicDescription.builder("Trades", "trades*.avro", "schemas/schema.avsc")
            .build();
}