Skip to content

Commit 37db100

Browse files
committed
To improve README.md
1 parent ab0e42b commit 37db100

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

README.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# About the `Modern C++ based Kafka API`
1+
# About the *Modern C++ Kafka API*
22

33
## Introduction
44

5-
The `Modern C++ based Kafka API` (`modern-cpp-kafka`) is a layer of C++ wrapper based on [librdkafka](https://github.com/edenhill/librdkafka) (the C part), with high quality, but more friendly to users.
5+
The [Modern C++ Kafka API](http://opensource.morganstanley.com/modern-cpp-kafka/doxygen/annotated.html) is a layer of C++ wrapper based on [librdkafka](https://github.com/edenhill/librdkafka) (the C part), with high quality, but more friendly to users.
66

7-
- By now, `modern-cpp-kafka` is compatible with `librdkafka` **v1.7.0**.
7+
- By now, [modern-cpp-kafka](https://github.com/morganstanley/modern-cpp-kafka) is compatible with [librdkafka v1.7.0](https://github.com/edenhill/librdkafka/releases/tag/v1.7.0).
88

99
```
1010
KAFKA is a registered trademark of The Apache Software Foundation and
@@ -14,13 +14,13 @@ affiliation with and is not endorsed by The Apache Software Foundation.
1414

1515
## Why it's here
1616

17-
The `librdkafka` is a robust high performance C/C++ library, widely used and well maintained.
17+
The ***librdkafka*** is a robust high performance C/C++ library, widely used and well maintained.
1818

19-
Unfortunately, to maintain C++98 compatibility, the C++ interface of `librdkafka` is not quite object-oriented or user-friendly.
19+
Unfortunately, to maintain C++98 compatibility, the C++ interface of ***librdkafka*** is not quite object-oriented or user-friendly.
2020

2121
Since C++ is evolving quickly, we want to take advantage of new C++ features, thus make the life easier for developers. And this led us to create a new C++ API for Kafka clients.
2222

23-
Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that uses idiomatic C++ features to provide a safe, efficient and easy to use way of producing and consuming Kafka messages.
23+
Eventually, we worked out the ***modern-cpp-kafka***, -- a header-only library that uses idiomatic C++ features to provide a safe, efficient and easy to use way of producing and consuming Kafka messages.
2424

2525
## Features
2626

@@ -36,7 +36,7 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
3636

3737
* RAII is used for lifetime management
3838

39-
* librdkafka's polling and queue management is now hidden
39+
* ***librdkafka***'s polling and queue management is now hidden
4040

4141
* Robust
4242

@@ -63,11 +63,11 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
6363

6464
* Specify library locations with environment variables
6565

66-
* `LIBRDKAFKA_ROOT` -- `librdkafka` headers and libraries
66+
* `LIBRDKAFKA_ROOT` -- ***librdkafka*** headers and libraries
6767

68-
* `GTEST_ROOT` -- `googletest` headers and libraries
68+
* `GTEST_ROOT` -- ***googletest*** headers and libraries
6969

70-
* `BOOST_ROOT` -- `boost` headers and libraries
70+
* `BOOST_ROOT` -- ***boost*** headers and libraries
7171

7272
* `SASL_LIBRARYDIR`/`SASL_LIBRARY` -- if SASL connection support is wanted
7373

@@ -89,7 +89,7 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
8989

9090
* `BUILD_OPTION_GEN_DOC=ON` -- Generate documentation as well
9191

92-
* `BUILD_OPTION_DOC_ONLY=ON` -- Only generate documentation
92+
* `BUILD_OPTION_DOC_ONLY=ON` -- Only generate documentation
9393

9494
* `BUILD_OPTION_GEN_COVERAGE=ON` -- Generate test coverage, only support by clang currently
9595

@@ -99,13 +99,13 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
9999

100100
* Include the `include/kafka` directory in your project
101101

102-
* To work together with `modern-cpp-kafka` API, the compiler should support
102+
* To work together with ***modern-cpp-kafka*** API, the compiler should support
103103

104104
* Option 1: C++17
105105

106106
* Option 2: C++14 (with pre-requirements)
107107

108-
* Need `boost` headers (for `boost::optional`)
108+
* Need ***boost*** headers (for `boost::optional`)
109109

110110
* GCC only (with optimization, e.g. -O2)
111111

@@ -135,6 +135,14 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
135135

136136
* E.g. `export KAFKA_BROKER_PIDS=61567,61569,61571`
137137

138+
* Additional settings for clients
139+
140+
* The environment variable `KAFKA_CLIENT_ADDITIONAL_SETTINGS` could be used for customized test environment
141+
142+
* Especially for Kafka cluster with SASL(or SSL) connections
143+
144+
* E.g. `export KAFKA_CLIENT_ADDITIONAL_SETTINGS="security.protocol=SASL_PLAINTEXT;sasl.kerberos.service.name=...;sasl.kerberos.keytab=...;sasl.kerberos.principal=..."`
145+
138146
## To Start
139147

140148
* Tutorial
@@ -147,23 +155,22 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
147155

148156
* User's Manual
149157

150-
* Kafka Client API
158+
* [Kafka Client API](http://opensource.morganstanley.com/modern-cpp-kafka/doxygen/annotated.html)
151159

152-
* [modern-cpp-kafka API](http://opensource.morganstanley.com/modern-cpp-kafka/doxygen/annotated.html)
153160

154161
* Kafka Client Properties
155162

156-
* In most cases, the `Properties` setting in `modern-cpp-kafka` is identical with [librdkafka configuration](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md)
163+
* In most cases, the `Properties` settings for ***modern-cpp-kafka*** are identical with [librdkafka configuration](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md)
157164

158165
* With following exceptions
159166

160167
* KafkaConsumer
161168

162-
* More properties than `librdkafka`
169+
* More properties than ***librdkafka***
163170

164171
* `max.poll.records` (default: `500`): The maxmum number of records that a single call to `poll()` would return
165172

166-
* Properties not supposed to be used (internally shadowed by `modern-cpp-kafka`)
173+
* Properties not supposed to be used (internally shadowed by ***modern-cpp-kafka***)
167174

168175
* `enable.auto.offset.store`
169176

@@ -179,7 +186,7 @@ Eventually, we worked out the `modern-cpp-kafka`, -- a header-only library that
179186

180187
* KafkaProducer
181188

182-
* Different default value from `librdkafka`
189+
* Different default value from ***librdkafka***
183190

184191
* KafkaSyncProducer
185192

include/kafka/ProducerConfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ProducerConfig: public Properties
7272

7373
/**
7474
* Maximum Kafka protocol request message size.
75-
* Note: Should be coordinated with the bokers's configuration. Otherwise, any larger message would be rejected!
75+
* Note: Should be coordinated with the brokers's configuration. Otherwise, any larger message would be rejected!
7676
* Default value: 1000000
7777
*/
7878
static const constexpr char* MESSAGE_MAX_BYTES = "message.max.bytes";

0 commit comments

Comments
 (0)