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

    https://github.com/apache/storm/pull/1951#discussion_r102769617
  
    --- Diff: 
external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/bolt/EventHubBolt.java
 ---
    @@ -84,12 +82,39 @@ public void prepare(Map config, TopologyContext context,
        @Override
        public void execute(Tuple tuple) {
                try {
    -                   
sender.send(boltConfig.getEventDataFormat().serialize(tuple));
    +                   EventData sendEvent = new 
EventData(boltConfig.getEventDataFormat().serialize(tuple));
    +                   if(boltConfig.getPartitionMode() && sender!=null)
    +                           sender.send(sendEvent).get();
    +                   else if(boltConfig.getPartitionMode() && sender==null)
    +                           throw new EventHubException("Sender is null");
    +                   else if(!boltConfig.getPartitionMode() && 
ehClient!=null)
    +                           ehClient.send(sendEvent).get();
    +                   else if(!boltConfig.getPartitionMode() && 
ehClient==null)
    +                           throw new EventHubException("ehclient is null");
                        collector.ack(tuple);
                } catch (EventHubException ex) {
                        collector.reportError(ex);
                        collector.fail(tuple);
                }
    +           catch (Exception e){
    +
    +           }
    --- End diff --
    
    Why catch-all ?
    This could potentially make this bolt a blackhole :)


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