apisix icon indicating copy to clipboard operation
apisix copied to clipboard

feat: kafka-logger not supports ssl

Open xwzp opened this issue 3 years ago • 7 comments

Description

I found there is no place to configure kafka-support use ssl.

In addition, the log kafka-logger output is not very clear, when connect to kafka using ssl: here are logs kafka-logger prints

2022/09/09 09:05:23 [error] 56#56: *23270 [lua] client.lua:150: _fetch_metadata(): all brokers failed in fetch topic metadata, context: ngx.timer, client: 10.42.1.14, server: 0.0.0.0:80
2022/09/09 09:05:23 [error] 56#56: *23270 [lua] client.lua:150: _fetch_metadata(): all brokers failed in fetch topic metadata, context: ngx.timer, client: 10.42.1.14, server: 0.0.0.0:80
2022/09/09 09:05:23 [error] 56#56: *23270 [lua] producer.lua:272: buffered messages send to kafka err: not found topic, retryable: true, topic: dataapi.apisix.log, partition_id: -1, length: 1, context: ngx.timer, client: 10.42.1.14, server: 0.0.0.0:80

It's hard to determine what happens

So please make kafka-logger supports ssl and make log more clearer

xwzp avatar Sep 09 '22 01:09 xwzp

PR's welcome to support the SSL feature!

tokers avatar Sep 09 '22 01:09 tokers

@MagicalBomb Hi, kafka-logger does not support ssl currently , we can optimize it

Hazel6869 avatar Sep 09 '22 01:09 Hazel6869

Welcome to submit PR.

guitu168 avatar Sep 09 '22 07:09 guitu168

I commit one PR, contains this, but test case is not pass….

biubiue avatar Sep 09 '22 11:09 biubiue

I commit one PR, contains this, but test case is not pass….

pls point the PR to resolve this issue

tzssangglass avatar Sep 13 '22 04:09 tzssangglass

I commit one PR, contains this, but test case is not pass….

is this pr https://github.com/apache/apisix/pull/7782/files ?

Hazel6869 avatar Sep 14 '22 06:09 Hazel6869

I commit one PR, contains this, but test case is not pass….

is this pr https://github.com/apache/apisix/pull/7782/files ?

yes, lua-resty-kafka source code in producer.new() function, it set ssl with client.new()

biubiue avatar Sep 14 '22 10:09 biubiue

Done

spacewander avatar Jan 12 '23 01:01 spacewander