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

    https://github.com/apache/storm/pull/572#discussion_r33065207
  
    --- Diff: external/storm-kafka/src/test/storm/kafka/KafkaUtilsTest.java ---
    @@ -193,11 +192,18 @@ private void createTopicAndSendMessage(String value) {
     
         private void createTopicAndSendMessage(String key, String value) {
             Properties p = new Properties();
    -        p.setProperty("metadata.broker.list", 
broker.getBrokerConnectionString());
    -        p.setProperty("serializer.class", 
"kafka.serializer.StringEncoder");
    -        ProducerConfig producerConfig = new ProducerConfig(p);
    -        Producer<String, String> producer = new Producer<String, 
String>(producerConfig);
    -        producer.send(new KeyedMessage<String, String>(config.topic, key, 
value));
    +        p.put("serializer.class", "kafka.serializer.StringEncoder");
    +        p.put("bootstrap.servers", broker.getBrokerConnectionString());
    +        p.put("key.serializer", 
"org.apache.kafka.common.serialization.StringSerializer");
    +        p.put("value.serializer", 
"org.apache.kafka.common.serialization.StringSerializer");
    +        p.put("metadata.fetch.timeout.ms", 1000);
    +        KafkaProducer<String, String> producer = new KafkaProducer<String, 
String>(p);
    +        try {
    +            producer.send(new ProducerRecord<String, String>(config.topic, 
key, value)).get();
    +        } catch (Exception e) {
    --- End diff --
    
    why are we ignoring all exceptions here?  If nothing else we should log or 
print.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to