Browse Source

Small fixes

Willem van Bergen 11 years ago
parent
commit
423e478a06
3 changed files with 6 additions and 8 deletions
  1. 2 3
      client.go
  2. 3 4
      consumer.go
  3. 1 1
      producer.go

+ 2 - 3
client.go

@@ -370,9 +370,8 @@ func (client *Client) update(data *MetadataResponse) ([]string, error) {
 // Creates a new ClientConfig instance with sensible defaults
 func NewClientConfig() *ClientConfig {
 	return &ClientConfig{
-		MetadataRetries:      3,
-		WaitForElection:      250 * time.Millisecond,
-		ConcurrencyPerBroker: 0,
+		MetadataRetries: 3,
+		WaitForElection: 250 * time.Millisecond,
 	}
 }
 

+ 3 - 4
consumer.go

@@ -320,6 +320,7 @@ func (c *Consumer) getOffset(where OffsetTime, retry bool) (int64, error) {
 	return -1, block.Err
 }
 
+// Creates a ConsumerConfig instance with sane defaults.
 func NewConsumerConfig() *ConsumerConfig {
 	return &ConsumerConfig{
 		DefaultFetchSize: 1024,
@@ -328,10 +329,8 @@ func NewConsumerConfig() *ConsumerConfig {
 	}
 }
 
-// Validates a ConsumerConfig instance. This will change zero
-// values into sensible defaults if possible, and it will return a
-// ConfigurationError if the specified value doesn't make sense and
-// cannot be corrected.
+// Validates a ConsumerConfig instance. It will return a
+// ConfigurationError if the specified value doesn't make sense.
 func (config *ConsumerConfig) Validate() error {
 	if config.DefaultFetchSize <= 0 {
 		return ConfigurationError("Invalid DefaultFetchSize")

+ 1 - 1
producer.go

@@ -456,7 +456,7 @@ func NewProducerConfig() *ProducerConfig {
 	}
 }
 
-// Validates a ProducerConfig instance. t will return a
+// Validates a ProducerConfig instance. It will return a
 // ConfigurationError if the specified value doesn't make sense.
 func (config *ProducerConfig) Validate() error {
 	if config.RequiredAcks < -1 {