Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace deprecated api of librdkafka #19

Merged
merged 1 commit into from
Oct 10, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ before_install:
install:
- if [ ! -d /opt ]; then mkdir /opt; fi
- if [ ! -d download-cache ]; then mkdir download-cache; fi
- if [ ! -d download-cache/librdkafka ]; then git clone -b 0.9.0 https://github.com/edenhill/librdkafka.git download-cache/librdkafka; fi
- if [ ! -d download-cache/librdkafka ]; then git clone -b v0.11.0 https://github.com/edenhill/librdkafka.git download-cache/librdkafka; fi
- if [ ! -f download-cache/nginx-$NGINX_VERSION.tar.gz ]; then wget -O download-cache/nginx-$NGINX_VERSION.tar.gz http://nginx.org/download/nginx-$NGINX_VERSION.tar.gz; fi
- if [ ! -f download-cache/openssl-$OPENSSL_VER.tar.gz ]; then wget -O download-cache/openssl-$OPENSSL_VER.tar.gz https://www.openssl.org/source/openssl-$OPENSSL_VER.tar.gz; fi
- if [ ! -f download-cache/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz ]; then wget -O download-cache/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz http://www-us.apache.org/dist/kafka/$KAFKA_VERSION/kafka_$SCALA_VERSION-$KAFKA_VERSION.tgz; fi
Expand Down
4 changes: 1 addition & 3 deletions ngx_http_kafka_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

#include <librdkafka/rdkafka.h>

#include <errno.h>

#define KAFKA_TOPIC_MAXLEN 256
#define KAFKA_BROKER_MAXLEN 512

Expand Down Expand Up @@ -455,7 +453,7 @@ static void ngx_http_kafka_post_callback_handler(ngx_http_request_t *r)
RD_KAFKA_MSG_F_COPY, (void *)msg, len, NULL, 0, conn_log);
if (rc != 0) {
ngx_log_error(NGX_LOG_ERR, conn_log, 0,
rd_kafka_err2str(rd_kafka_errno2err(errno)));
rd_kafka_err2str(rd_kafka_last_error()));

err_msg = (u_char *)KAFKA_ERR_PRODUCER;
err_msg_size = sizeof(KAFKA_ERR_PRODUCER);
Expand Down