소스 검색

Add partition per message on producer performance tool (bug fix)

AJ Yoo 7 년 전
부모
커밋
d4410b55bc
1개의 변경된 파일과 3개의 추가작업 그리고 2개의 파일을 삭제
  1. 3 2
      tools/kafka-producer-performance/main.go

+ 3 - 2
tools/kafka-producer-performance/main.go

@@ -215,8 +215,9 @@ func main() {
 			printErrorAndExit(69, "Failed to generate message payload: %s", err)
 		}
 		messages[i] = &sarama.ProducerMessage{
-			Topic: *topic,
-			Value: sarama.ByteEncoder(payload),
+			Topic:     *topic,
+			Partition: int32(*partition),
+			Value:     sarama.ByteEncoder(payload),
 		}
 	}