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

    https://github.com/apache/nifi/pull/676#discussion_r88591332
  
    --- Diff: 
nifi-nar-bundles/nifi-azure-bundle/nifi-azure-processors/src/main/java/org/apache/nifi/processors/azure/eventhub/PutAzureEventHub.java
 ---
    @@ -161,25 +170,38 @@ public void onTrigger(final ProcessContext context, 
final ProcessSession session
             }
     
             final StopWatch stopWatch = new StopWatch(true);
    -            final byte[] buffer = new byte[(int) flowFile.getSize()];
    -            session.read(flowFile, in -> StreamUtils.fillBuffer(in, 
buffer));
    +        final Map<String, String> attributes = new HashMap<>();
    +        final byte[] buffer = new byte[(int) flowFile.getSize()];
    +        session.read(flowFile, in -> StreamUtils.fillBuffer(in, buffer));
    +
    +        final PropertyValue idPropertyValue = 
context.getProperty(PARTITION_KEY);
    +
    +        final String partitionId = (null == idPropertyValue || 
!idPropertyValue.isSet()) ?
    +                UUID.randomUUID().toString() : idPropertyValue.getValue();
    --- End diff --
    
    Do we have to generate UUID here? Or should we let EventHub library handle 
that? How does the library determine partition if we doesn't pass any partition 
key to sendSync?


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