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

    https://github.com/apache/metron/pull/1082#discussion_r199291506
  
    --- Diff: 
metron-platform/metron-writer/src/main/java/org/apache/metron/writer/kafka/KafkaWriter.java
 ---
    @@ -197,6 +209,15 @@ public void init(Map stormConf, TopologyContext 
topologyContext, WriterConfigura
         return producerConfig;
       }
     
    +  public Optional<String> getKafkaTopic(JSONObject message) {
    +    if(kafkaTopicField != null) {
    +      return Optional.ofNullable((String)message.get(kafkaTopicField));
    +    }
    +    else {
    +      return Optional.ofNullable(kafkaTopic);
    +    }
    --- End diff --
    
    It would make sense to add some debug statements showing which topic was 
chosen and what the field value is.  This would make debugging a routing issue 
much simpler for the user.


---

Reply via email to