From 018a1f52d9590e25cd31d24021b9343a08121bbe Mon Sep 17 00:00:00 2001 From: accelerated <> Date: Tue, 3 Apr 2018 11:58:21 -0400 Subject: [PATCH 1/3] Fixed deprecated error librdkafka function --- README.md | 12 +++++++++--- src/kafka_handle_base.cpp | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 38878ed..3bbbe45 100644 --- a/README.md +++ b/README.md @@ -76,9 +76,15 @@ If you have installed _librdkafka_ on a non standard directory, you can use the cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir ``` -Note that finding _librdkafka_ will succeed iff there's an _include_ and _lib_ -directories inside the specified path, including both the _rdkafka.h_ header -and the _librdkafka_ library file. +Note that the **RDKAFKA_ROOT_DIR** must contain the following structure: + +```Shell +${RDKAFKA_ROOT_DIR}/ + | + + include/librdkafka/rdkafka.h + | + + lib/librdkafka.a +``` --- diff --git a/src/kafka_handle_base.cpp b/src/kafka_handle_base.cpp index 2369fcb..1744e6d 100644 --- a/src/kafka_handle_base.cpp +++ b/src/kafka_handle_base.cpp @@ -172,7 +172,7 @@ void KafkaHandleBase::set_handle(rd_kafka_t* handle) { Topic KafkaHandleBase::get_topic(const string& name, rd_kafka_topic_conf_t* conf) { rd_kafka_topic_t* topic = rd_kafka_topic_new(get_handle(), name.data(), conf); if (!topic) { - throw HandleException(rd_kafka_errno2err(errno)); + throw HandleException(rd_kafka_last_error()); } return Topic(topic); } From 6db2cdcecf4575c734119453931072ce80ac629a Mon Sep 17 00:00:00 2001 From: accelerated <> Date: Tue, 3 Apr 2018 12:02:21 -0400 Subject: [PATCH 2/3] Fixed font --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 3bbbe45..913b973 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ If you have installed _librdkafka_ on a non standard directory, you can use the cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir ``` -Note that the **RDKAFKA_ROOT_DIR** must contain the following structure: +Note that the `RDKAFKA_ROOT_DIR` must contain the following structure: ```Shell ${RDKAFKA_ROOT_DIR}/ @@ -86,8 +86,6 @@ ${RDKAFKA_ROOT_DIR}/ + lib/librdkafka.a ``` ---- - By default, a shared library will be built. If you want to perform a static build, use the _CPPKAFKA_BUILD_SHARED_ parameter: From 3d1402f53a331f39ec88b638b906989bab6a1dee Mon Sep 17 00:00:00 2001 From: accelerated <> Date: Tue, 3 Apr 2018 12:04:26 -0400 Subject: [PATCH 3/3] Fixed font --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 913b973..b42bb2e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ ${RDKAFKA_ROOT_DIR}/ ``` By default, a shared library will be built. If you want to perform a static build, -use the _CPPKAFKA_BUILD_SHARED_ parameter: +use the `CPPKAFKA_BUILD_SHARED` parameter: ```Shell cmake .. -DCPPKAFKA_BUILD_SHARED=0