Application configuration

The application is configured via the properties.xml file, in the resources/META-INF directory, and includes the following elements:

  • The Kafka input topic
  • The Kafka broker address and port
  • A schema of input records and its name
  • A schema of output records and its name
  • The SQL query used to filter and project
  • The output filename
  • The output directory

The first two are straightforward:

<property>
    <name>apex.operator.KafkaInput.prop.topics</name>
    <value>ETLTopic</value>
</property><property>
    <name>apex.operator.KafkaInput.prop.clusters</name>
    <value>localhost:9092</value>  <!-- broker (NOT zookeeper) address -->
</property> 

The topics property of the KafkaInput operator defines the topic for input records, and the ...

Get Learning Apache Apex now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.