[ 
https://issues.apache.org/jira/browse/STORM-826?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14597961#comment-14597961
 ] 

ASF GitHub Bot commented on STORM-826:
--------------------------------------

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.


> As a storm developer I’d like to use the new kafka producer API to reduce 
> dependencies and use long term supported kafka apis 
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: STORM-826
>                 URL: https://issues.apache.org/jira/browse/STORM-826
>             Project: Apache Storm
>          Issue Type: Story
>          Components: storm-kafka
>            Reporter: Thomas Becker
>            Assignee: Zhuo Liu
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to