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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65f16e3cb305ed9abe2c9969c929b1f63a73ad9c
4
- data.tar.gz: fa75eb12ac1fc0d3596972c9d61c6a2d879e2af3
3
+ metadata.gz: b1253b7f59126580e11cc6eb1d6f40318f9367bd
4
+ data.tar.gz: dc75b9c99e96455add399e4645dacf5f26358810
5
5
  SHA512:
6
- metadata.gz: 74255febdd2152a9cc8665c1d4415bd51b07f3af4089fc82c2de11e2001465f3149e0c8b7fed6bfc5db9a9d729b7f251968a2ac5858bb6c4ce0a435603f8f867
7
- data.tar.gz: 6581acbfc5fb1b00df4510f7786e616b8142cc6e168c8bff548752748db629ca3e99df3d3e7b39a429567fb8f41ae9df5bbbf676c12b611561ce1fb2c5f9d061
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 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>)
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 kafka_buffered
49
- brokers <broker1_host>:<broker1_ip>,<broker2_host>:<broker2_ip>,..
50
- default_topic <output topic>
51
- flush_interval <flush interval (sec) :default => 60>
52
- buffer_type (file|memory)
53
- output_data_type (json|ltsv|msgpack|attr:<record name>)
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
@@ -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.7'
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.7
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-07-13 00:00:00.000000000 Z
11
+ date: 2014-10-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd