mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2025-11-02 03:28:01 +00:00
Merge pull request #47 from accelerated/master
Fixed deprecated error function call
This commit is contained in:
14
README.md
14
README.md
@@ -76,14 +76,18 @@ If you have installed _librdkafka_ on a non standard directory, you can use the
|
|||||||
cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir
|
cmake .. -DRDKAFKA_ROOT_DIR=/some/other/dir
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that finding _librdkafka_ will succeed iff there's an _include_ and _lib_
|
Note that the `RDKAFKA_ROOT_DIR` must contain the following structure:
|
||||||
directories inside the specified path, including both the _rdkafka.h_ header
|
|
||||||
and the _librdkafka_ library file.
|
|
||||||
|
|
||||||
---
|
```Shell
|
||||||
|
${RDKAFKA_ROOT_DIR}/
|
||||||
|
|
|
||||||
|
+ include/librdkafka/rdkafka.h
|
||||||
|
|
|
||||||
|
+ lib/librdkafka.a
|
||||||
|
```
|
||||||
|
|
||||||
By default, a shared library will be built. If you want to perform a static build,
|
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
|
```Shell
|
||||||
cmake .. -DCPPKAFKA_BUILD_SHARED=0
|
cmake .. -DCPPKAFKA_BUILD_SHARED=0
|
||||||
|
|||||||
@@ -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) {
|
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);
|
rd_kafka_topic_t* topic = rd_kafka_topic_new(get_handle(), name.data(), conf);
|
||||||
if (!topic) {
|
if (!topic) {
|
||||||
throw HandleException(rd_kafka_errno2err(errno));
|
throw HandleException(rd_kafka_last_error());
|
||||||
}
|
}
|
||||||
return Topic(topic);
|
return Topic(topic);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user