fluent-plugin-kafka 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +33 -10
- data/fluent-plugin-kafka.gemspec +1 -1
- data/lib/fluent/plugin/out_kafka.rb +7 -1
- data/lib/fluent/plugin/out_kafka_buffered.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b1253b7f59126580e11cc6eb1d6f40318f9367bd
|
4
|
+
data.tar.gz: dc75b9c99e96455add399e4645dacf5f26358810
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de391f877d6db11e0ccbd1a35646043274ef5aeab91015ff09981571fc356d24965289c93f599887d12958549114ef6441a4bce4b856728e8e00ca7dc4f1c011
|
7
|
+
data.tar.gz: 8c95e61c6617890c7be10dae81f963b4cdb5257829b8e5618cf4c5dfcda618456429a08d8347bc088520174c0bb63ed674528f41d887e3aa3793334ec9f978f4
|
data/README.md
CHANGED
@@ -34,27 +34,50 @@ Or install it yourself as:
|
|
34
34
|
### Output plugin (non-buffered)
|
35
35
|
|
36
36
|
<match *.**>
|
37
|
-
type
|
38
|
-
brokers
|
39
|
-
default_topic
|
40
|
-
output_data_type
|
37
|
+
type kafka
|
38
|
+
brokers <broker1_host>:<broker1_ip>,<broker2_host>:<broker2_ip>,..
|
39
|
+
default_topic <output topic>
|
40
|
+
output_data_type (json|ltsv|msgpack|attr:<record name>)
|
41
41
|
output_include_tag (true|false) :default => false
|
42
42
|
output_include_time (true|false) :default => false
|
43
|
+
max_send_retries (integer) :default => 3
|
44
|
+
required_acks (integer) :default => 0
|
45
|
+
ack_timeout_ms (integer) :default => 1500
|
43
46
|
</match>
|
44
47
|
|
48
|
+
Supports following Poseidon::Producer options.
|
49
|
+
|
50
|
+
- max_send_retries — default: 3 — Number of times to retry sending of messages to a leader.
|
51
|
+
- required_acks — default: 0 — The number of acks required per request.
|
52
|
+
- ack_timeout_ms — default: 1500 — How long the producer waits for acks.
|
53
|
+
|
54
|
+
See also [Poseidon::Producer](http://www.rubydoc.info/github/bpot/poseidon/Poseidon/Producer) for more detailed documentation about Poseidon.
|
55
|
+
|
45
56
|
### Buffered output plugin
|
46
57
|
|
47
58
|
<match *.**>
|
48
|
-
type
|
49
|
-
brokers
|
50
|
-
default_topic
|
51
|
-
flush_interval
|
52
|
-
buffer_type
|
53
|
-
output_data_type
|
59
|
+
type kafka_buffered
|
60
|
+
brokers <broker1_host>:<broker1_ip>,<broker2_host>:<broker2_ip>,..
|
61
|
+
default_topic <output topic>
|
62
|
+
flush_interval <flush interval (sec) :default => 60>
|
63
|
+
buffer_type (file|memory)
|
64
|
+
output_data_type (json|ltsv|msgpack|attr:<record name>)
|
54
65
|
output_include_tag (true|false) :default => false
|
55
66
|
output_include_time (true|false) :default => false
|
67
|
+
max_send_retries (integer) :default => 3
|
68
|
+
required_acks (integer) :default => 0
|
69
|
+
ack_timeout_ms (integer) :default => 1500
|
56
70
|
</match>
|
57
71
|
|
72
|
+
Supports following Poseidon::Producer options.
|
73
|
+
|
74
|
+
- max_send_retries — default: 3 — Number of times to retry sending of messages to a leader.
|
75
|
+
- required_acks — default: 0 — The number of acks required per request.
|
76
|
+
- ack_timeout_ms — default: 1500 — How long the producer waits for acks.
|
77
|
+
|
78
|
+
See also [Poseidon::Producer](http://www.rubydoc.info/github/bpot/poseidon/Poseidon/Producer) for more detailed documentation about Poseidon.
|
79
|
+
|
80
|
+
|
58
81
|
## Contributing
|
59
82
|
|
60
83
|
1. Fork it
|
data/fluent-plugin-kafka.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "fluent-plugin-kafka"
|
14
14
|
gem.require_paths = ["lib"]
|
15
|
-
gem.version = '0.0.
|
15
|
+
gem.version = '0.0.8'
|
16
16
|
gem.add_dependency 'fluentd'
|
17
17
|
gem.add_dependency 'poseidon'
|
18
18
|
gem.add_dependency 'ltsv'
|
@@ -13,6 +13,12 @@ class Fluent::KafkaOutput < Fluent::Output
|
|
13
13
|
config_param :output_data_type, :string, :default => 'json'
|
14
14
|
config_param :output_include_tag, :bool, :default => false
|
15
15
|
config_param :output_include_time, :bool, :default => false
|
16
|
+
|
17
|
+
# poseidon producer options
|
18
|
+
config_param :max_send_retries, :integer, :default => 3
|
19
|
+
config_param :required_acks, :integer, :default => 0
|
20
|
+
config_param :ack_timeout_ms, :integer, :default => 1500
|
21
|
+
|
16
22
|
attr_accessor :output_data_type
|
17
23
|
attr_accessor :field_separator
|
18
24
|
|
@@ -87,7 +93,7 @@ class Fluent::KafkaOutput < Fluent::Output
|
|
87
93
|
topic = record['topic'] || self.default_topic || tag
|
88
94
|
partition = record['partition'] || self.default_partition
|
89
95
|
message = Poseidon::MessageToSend.new(topic, parse_record(record))
|
90
|
-
@producers[topic] ||= Poseidon::Producer.new(@seed_brokers, self.client_id)
|
96
|
+
@producers[topic] ||= Poseidon::Producer.new(@seed_brokers, self.client_id, :max_send_retries => @max_send_retries, :required_acks => @required_acks, :ack_timeout_ms => @ack_timeout_ms)
|
91
97
|
@producers[topic].send_messages([message])
|
92
98
|
end
|
93
99
|
end
|
@@ -14,6 +14,12 @@ class Fluent::KafkaOutputBuffered < Fluent::BufferedOutput
|
|
14
14
|
config_param :output_data_type, :string, :default => 'json'
|
15
15
|
config_param :output_include_tag, :bool, :default => false
|
16
16
|
config_param :output_include_time, :bool, :default => false
|
17
|
+
|
18
|
+
# poseidon producer options
|
19
|
+
config_param :max_send_retries, :integer, :default => 3
|
20
|
+
config_param :required_acks, :integer, :default => 0
|
21
|
+
config_param :ack_timeout_ms, :integer, :default => 1500
|
22
|
+
|
17
23
|
attr_accessor :output_data_type
|
18
24
|
attr_accessor :field_separator
|
19
25
|
|
@@ -102,7 +108,7 @@ class Fluent::KafkaOutputBuffered < Fluent::BufferedOutput
|
|
102
108
|
records_by_topic.each { |topic, partitions|
|
103
109
|
partitions.each_with_index { |messages, partition|
|
104
110
|
next if not messages
|
105
|
-
@producers[topic] ||= Poseidon::Producer.new(@seed_brokers, self.client_id)
|
111
|
+
@producers[topic] ||= Poseidon::Producer.new(@seed_brokers, self.client_id, :max_send_retries => @max_send_retries, :required_acks => @required_acks, :ack_timeout_ms => @ack_timeout_ms)
|
106
112
|
@producers[topic].send_messages(messages)
|
107
113
|
}
|
108
114
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-kafka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hidemasa Togashi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|