Skip to content
New issue

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

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

Already on GitHub? # to your account

[WIP] Kafka Logger. #1260

Closed
wants to merge 10 commits into from
Closed

[WIP] Kafka Logger. #1260

wants to merge 10 commits into from

Conversation

Akayeshmantha
Copy link
Member

Adding kafka plugin.

Issues resolved

Fix #1259

@membphis membphis changed the title WIP Kafka Logger. [WIP] Kafka Logger. Mar 14, 2020
@Akayeshmantha
Copy link
Member Author

Akayeshmantha commented Mar 18, 2020

Hi @membphis @moonming this will be the basic kafka logger with one broker support.

I think it's better to give the ability to define more brokers with object type ?

broker = {
"127.0.0.1" : "8080",
"127.0.0.1" : "8090",
}

And below as the schema

broker = {type = "object"}, timeout = { -- timeout in milliseconds type = "integer", minimum = 1, default= 2000 }, kafka_topic = {type = "string"}, async = { type = "boolean", default = false }, key = {type = "string"}, max_retry = {type = "integer", minimum = 0 , default = 3},

Also will fix the tests when schema is finalized

@moonming
Copy link
Member

Hi @membphis @moonming this will be the basic kafka logger with one broker support.

I think it's better to give the ability to define more brokers with object type ?

broker = {

"127.0.0.1" : "8080",

"127.0.0.1" : "8090",

}

And below as the schema

`

    broker = {type = "object"},

    timeout = {   -- timeout in milliseconds

        type = "integer", minimum = 1, default= 2000

    },

    kafka_topic = {type = "string"},

    async =  { type = "boolean", default = false },

    key = {type = "string"},

    max_retry = {type = "integer", minimum = 0 , default = 3},

`

Also will fix the tests when schema is finalized

LGTM

local broker_list = {
{ host = conf.broker_host, port = conf.port }
}
if #conf.broker_list == 0 then
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the conf. broker_list is a hash object, we need to use table.nkeys to fetch the number of attributes.

# is useful for array tables.

@@ -56,6 +56,13 @@ before_cache:
- brew cleanup

before_install:
- docker pull bitnami/zookeeper:3.6.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should install dependencies in specific scripts, eg: https://github.com/apache/incubator-apisix/blob/master/.travis/linux_openresty_runner.sh#L35

It may be a little between different os, eg: Linux and OSX.

Akayeshmantha added 2 commits March 21, 2020 14:10
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support to kafka publisher plugin
3 participants