Skip to content

Commit

Permalink
Doc fixes (#801)
Browse files Browse the repository at this point in the history
* Fixes #799

* Add example documentation KafkaClient usage to address #666
  • Loading branch information
hyperlink authored Nov 13, 2017
1 parent efe8337 commit d5224f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ New KafkaClient connects directly to Kafka brokers instead of connecting to zook
* `idleConnection` : allows the broker to disconnect an idle connection from a client (otherwise the clients continues to reconnect after being disconnected). The value is elapsed time in ms without any data written to the TCP socket. default: 5 minutes
* `maxAsyncRequests` : maximum async operations at a time toward the kafka cluster. default: 10

### Example

```javascript
const client = new kafka.KafkaClient({kafkaHost: '10.3.100.196:9092'});
```

## Client
### Client(connectionString, clientId, [zkOptions], [noAckBatchOptions], [sslOptions])
* `connectionString`: Zookeeper connection string, default `localhost:2181/`
Expand Down Expand Up @@ -365,6 +371,7 @@ consumerGroup.pipe(messageTransform).pipe(resultProducer);
{
topic: 'topicName',
offset: 0, //default 0
partition: 0 // default 0
}
```

Expand Down

0 comments on commit d5224f8

Please sign in to comment.