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

    https://github.com/apache/storm/pull/2071#discussion_r115320207
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/bolt/KafkaBolt.java
 ---
    @@ -119,7 +117,12 @@ public void prepare(Map stormConf, TopologyContext 
context, OutputCollector coll
                 }
             }
     
    -        producer = mkProducer(boltSpecifiedProperties);
    +        synchronized (KafkaBolt.class) {
    +            if (producer == null) {
    +                producer = mkProducer(boltSpecifiedProperties);
    --- End diff --
    
    since you are touching this code, can you please rename the method to 
**mkProducer** to **newProducer** or **createProducer**.  I don't think mk is 
conventional and/or meaningful.


---
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