title: use kafka-producer-perf-test.sh how to set producer config at kafka_2.10-0.8.2.0
body: <pre><code>bin/kafka-producer-perf-test.sh --messages 1000000 --message-size 1000 --topics kafka_producertest_1replication_1partitions --broker-list mesos006:9092,mesos007:9092,mesos008:9092 --threads 1 --compression-codec 3 --batch-size 100000
  </code></pre>
  
  <p>Exception:</p>
  
  <pre><code>Exception in thread "main" kafka.common.InvalidConfigException: Batch size = 100000 can't be larger than queue size = 10000
          at kafka.producer.ProducerConfig$.validateBatchSize(ProducerConfig.scala:39)
          at kafka.producer.ProducerConfig$.validate(ProducerConfig.scala:29)
          at kafka.producer.ProducerConfig.&lt;init&gt;(ProducerConfig.scala:116)
          at kafka.producer.ProducerConfig.&lt;init&gt;(ProducerConfig.scala:56)
          at kafka.producer.OldProducer.&lt;init&gt;(BaseProducer.scala:59)
          at kafka.tools.ProducerPerformance$ProducerThread.&lt;init&gt;(ProducerPerformance.scala:210)
          at kafka.tools.ProducerPerformance$$anonfun$main$1.apply$mcVI$sp(ProducerPerformance.scala:58)
          at scala.collection.immutable.Range.foreach$mVc$sp(Range.scala:141)
          at kafka.tools.ProducerPerformance$.main(ProducerPerformance.scala:57)
          at kafka.tools.ProducerPerformance.main(ProducerPerformance.scala)
  </code></pre>
  
  <p>config/producer.properties:</p>
  
  <pre><code>queue.buffering.max.messages=100000
  </code></pre>
  
  <p>When using kafka-producer-perf-test.sh, how to set all the parameters of the producer. Or give it a configuration file (for example: config/producer.properties)
  how tow make config/producer.properties effect?</p>
  
  <p>kafka-producer-perf-test.sh parameters</p>
  
  <pre><code>[root@mesos006 kafka_2.10-0.8.2.0]# bin/kafka-producer-perf-test.sh 
  Missing required argument "[topics]"
  Option                                  Description                            
  ------                                  -----------                            
  --batch-size &lt;Integer: size&gt;            Number of messages to write in a       
                                            single batch. (default: 200)         
  --broker-list &lt;hostname:port,..,        REQUIRED: broker info (the list of     
    hostname:port&gt;                          broker host and port for bootstrap.  
  --compression-codec &lt;Integer:           If set, messages are sent compressed   
    supported codec: NoCompressionCodec     (default: 0)                         
    as 0, GZIPCompressionCodec as 1,                                             
    SnappyCompressionCodec as 2,                                                 
    LZ4CompressionCodec as 3&gt;                                                    
  --csv-reporter-enabled                  If set, the CSV metrics reporter will  
                                            be enabled                           
  --date-format &lt;date format&gt;             The date format to use for formatting  
                                            the time field. See java.text.       
                                            SimpleDateFormat for options.        
                                            (default: yyyy-MM-dd HH:mm:ss:SSS)   
  --help                                  Print usage.                           
  --hide-header                           If set, skips printing the header for  
                                            the stats                            
  --initial-message-id &lt;Integer: initial  The is used for generating test data,  
    message id&gt;                             If set, messages will be tagged with 
                                            an ID and sent by producer starting  
                                            from this ID sequentially. Message   
                                            content will be String type and in   
                                            the form of 'Message:000...1:xxx...' 
  --message-send-gap-ms &lt;Integer:         If set, the send thread will wait for  
    message send time gap&gt;                  specified time between two sends     
                                            (default: 0)                         
  --message-size &lt;Integer: size&gt;          The size of each message. (default:    
                                            100)                                 
  --messages &lt;Long: count&gt;                The number of messages to send or      
                                            consume (default:                    
                                            9223372036854775807)                 
  --metrics-dir &lt;metrics dictory&gt;         If csv-reporter-enable is set, and     
                                            this parameter isset, the csv        
                                            metrics will be outputed here        
  --new-producer                          Use the new producer implementation.   
  --producer-num-retries &lt;Integer&gt;        The producer retries number (default:  
                                            3)                                   
  --producer-retry-backoff-ms &lt;Integer&gt;   The producer retry backoff time in     
                                            milliseconds (default: 100)          
  --reporting-interval &lt;Integer: size&gt;    Interval at which to print progress    
                                            info. (default: 5000)                
  --request-num-acks &lt;Integer&gt;            Number of acks required for producer   
                                            request to complete (default: -1)    
  --request-timeout-ms &lt;Integer&gt;          The produce request timeout in ms      
                                            (default: 3000)                      
  --show-detailed-stats                   If set, stats are reported for each    
                                            reporting interval as configured by  
                                            reporting-interval                   
  --sync                                  If set, messages are sent              
                                            synchronously.                       
  --threads &lt;Integer: number of threads&gt;  Number of sending threads. (default: 1)
  --topics &lt;topic1,topic2..&gt;              REQUIRED: The comma separated list of  
                                            topics to produce to                 
  --vary-message-size                     If set, message size will vary up to   
                                            the given maximum.
  </code></pre>