Github user cestella commented on a diff in the pull request:

    https://github.com/apache/metron/pull/1082#discussion_r199552556
  
    --- Diff: 
metron-platform/metron-writer/src/main/java/org/apache/metron/writer/kafka/KafkaWriter.java
 ---
    @@ -212,10 +233,13 @@ public BulkWriterResponse write(String sensorType, 
WriterConfiguration configura
             writerResponse.addError(t, tuple);
             continue;
           }
    -      Future future = kafkaProducer
    -          .send(new ProducerRecord<String, String>(kafkaTopic, 
jsonMessage));
    -      // we want to manage the batching
    -      results.add(new AbstractMap.SimpleEntry<>(tuple, future));
    +      Optional<String> topic = getKafkaTopic(message);
    +      if(topic.isPresent()) {
    --- End diff --
    
    If the topic is not present, then the message is dropped because we don't 
know where to send it.  It's not unexpected necessarily.


---

Reply via email to