Skip to content

Commit 018a1f5

Browse files
author
accelerated
committed
Fixed deprecated error librdkafka function
1 parent df12b5f commit 018a1f5

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,15 @@ If you have installed _librdkafka_ on a non standard directory, you can use the
7676
cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir
7777
```
7878

79-
Note that finding _librdkafka_ will succeed iff there's an _include_ and _lib_
80-
directories inside the specified path, including both the _rdkafka.h_ header
81-
and the _librdkafka_ library file.
79+
Note that the **RDKAFKA_ROOT_DIR** must contain the following structure:
80+
81+
```Shell
82+
${RDKAFKA_ROOT_DIR}/
83+
|
84+
+ include/librdkafka/rdkafka.h
85+
|
86+
+ lib/librdkafka.a
87+
```
8288

8389
---
8490

src/kafka_handle_base.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ void KafkaHandleBase::set_handle(rd_kafka_t* handle) {
172172
Topic KafkaHandleBase::get_topic(const string& name, rd_kafka_topic_conf_t* conf) {
173173
rd_kafka_topic_t* topic = rd_kafka_topic_new(get_handle(), name.data(), conf);
174174
if (!topic) {
175-
throw HandleException(rd_kafka_errno2err(errno));
175+
throw HandleException(rd_kafka_last_error());
176176
}
177177
return Topic(topic);
178178
}

0 commit comments

Comments
 (0)