
pipeline:

  test-input:
    module: file-in
    config:
      globs:
        - test/kafka/test.log

  lines:
    inChannels:
      - test-input

  json-in:
    inChannels:
      - lines

  kafka-out:
    inChannels:
      - json-in
    config:
      format: json
      hosts:
        - 'localhost:9092'
      topic: !!js/function >-
        function(event) {
          return event.y % 2 === 0 ? 'even' : 'odd'
        }
      debug: broker,topic,msg
      intervalSeconds: 0.1
      compression: gzip

  log-errors:
    module: errors
    inChannels:
      - errors
    config:
      intervalSeconds: 5
      stackDepth: 6

  log-stats:
    module: stats
    inChannels:
      - stats

  log:
    inChannels:
      - log
      - log-errors
      - log-stats
