You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/09/20 04:14:17 UTC

[GitHub] [kafka] vgvineet4 commented on a change in pull request #9254: KAFKA-10462: Added support to pass headers in producerPerformance script

vgvineet4 commented on a change in pull request #9254:
URL: https://github.com/apache/kafka/pull/9254#discussion_r491649810



##########
File path: tools/src/main/java/org/apache/kafka/tools/ProducerPerformance.java
##########
@@ -87,6 +88,11 @@ public static void main(String[] args) throws Exception {
                     payloadByteList.add(payload.getBytes(StandardCharsets.UTF_8));
                 }
             }
+            
+            Properties headerProps = new Properties();
+            if (headersPath != null) {
+                headerProps.putAll(Utils.loadProps(headersPath));

Review comment:
       @omkreddy Thanks for reviewing the PR. Line number 142 <code>payload = payloadByteList.get(random.nextInt(payloadByteList.size()));</code> pulls the record in file randomly. It would be hard to map headers to the required payload. My thinking was this could serve well for those who want to check against a particular workflow where the payload or data in each record varies but header remain constant. 
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org