fluent-plugin-sqs 1.6.1 → 1.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d74f724bc816410b2900572f6723bf07dae8fce1
4
- data.tar.gz: d4a26deded7814151d8f05b9246bc94c4f75a849
3
+ metadata.gz: 0628a3f6f51b51080064b97080ac79738f939017
4
+ data.tar.gz: d19800d15df393d4d7395dafe5cc00398b55126a
5
5
  SHA512:
6
- metadata.gz: a2b7bb4e8e029bc75ac2e8badc364d36b619d324ca659365f30d2a5782d218463f07d4bfa0d7bec1060e8310a133bbbdcedac4dc9b80348e4bc8fe5aecb9a454
7
- data.tar.gz: c0eace6d1ba82afe058bb69ba67aed318c02db1581b969e2a16da32718676dca12f23d265f9476fc7bfcead05a82314ef299da5d1af3c90c0d66734704b3ad8f
6
+ metadata.gz: e43bc1ad131e4636ca9e074490886e6b6b123a7d0c68da480af54a4f43015acc4a197fba4f8c546a914875d3c8896fbc4099ad615500975bd63414c27d4da910
7
+ data.tar.gz: be39293222071bcbffd2234a07173523bd159292c2c62aa18c65d867950458167cdf955048436c7e0a4cdff732ef7c3e2b8d934fbafd65e8f87a84a693c429b6
data/README.rdoc CHANGED
@@ -44,7 +44,7 @@ Read events from from amazon SQS.
44
44
  # EU-West (Ireland) : sqs.eu-west-1.amazonaws.com
45
45
  # South America (São Paulo) : sns.sa-east-1.amazonaws.com
46
46
 
47
- delay_seconds {delivery_deley_seconds}
47
+ delay_seconds {delivery_delay_seconds}
48
48
 
49
49
  include_tag {boolean}
50
50
  tag_property_name {tag's property name in json}
@@ -82,6 +82,10 @@ Read events from from amazon SQS.
82
82
 
83
83
  receive_interval {receive_interval_seconds}
84
84
 
85
+ max_number_of_messages {max_number_of_messages}
86
+
87
+ wait_time_seconds {receive_message_wait_time_seconds}
88
+
85
89
  </source>
86
90
 
87
91
  == Tool
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.6.1
1
+ 1.6.2
@@ -14,8 +14,9 @@ module Fluent
14
14
  config_param :tag, :string
15
15
  config_param :sqs_endpoint, :string, :default => 'sqs.ap-northeast-1.amazonaws.com'
16
16
  config_param :sqs_url, :string
17
- config_param :receive_interval, :time, :default => 1
18
- config_param :max_number_of_messages, :integer, :default => 1
17
+ config_param :receive_interval, :time, :default => 0.1
18
+ config_param :max_number_of_messages, :integer, :default => 10
19
+ config_param :wait_time_seconds, :integer, :default => 10
19
20
 
20
21
  def configure(conf)
21
22
  super
@@ -47,7 +48,10 @@ module Fluent
47
48
  until @finished
48
49
  begin
49
50
  sleep @receive_interval
50
- @queue.receive_message(:limit => @max_number_of_messages) do |message|
51
+ @queue.receive_message(
52
+ :limit => @max_number_of_messages,
53
+ :wait_time_seconds => @wait_time_seconds
54
+ ) do |message|
51
55
  record = {}
52
56
  record['body'] = message.body.to_s
53
57
  record['handle'] = message.handle.to_s
@@ -16,6 +16,7 @@ describe do
16
16
  tag TAG
17
17
  sqs_url SQS_URL
18
18
  max_number_of_messages 10
19
+ wait_time_seconds 10
19
20
  ]
20
21
  }
21
22
 
@@ -41,13 +42,18 @@ describe do
41
42
 
42
43
  context do
43
44
  subject {instance.receive_interval}
44
- it{should == 1}
45
+ it{should == 0.1}
45
46
  end
46
47
 
47
48
  context do
48
49
  subject {instance.max_number_of_messages}
49
50
  it{should == 10}
50
51
  end
52
+
53
+ context do
54
+ subject {instance.wait_time_seconds}
55
+ it{should == 10}
56
+ end
51
57
  end
52
58
 
53
59
  describe 'emit' do
@@ -76,7 +82,7 @@ describe do
76
82
  })
77
83
  end
78
84
  end
79
- expect_any_instance_of(AWS::SQS::Queue).to receive(:receive_message).with({:limit => 10}).at_least(:once).and_call_original
85
+ expect_any_instance_of(AWS::SQS::Queue).to receive(:receive_message).with({:limit => 10, :wait_time_seconds=>10}).at_least(:once).and_call_original
80
86
 
81
87
  d = driver
82
88
  d.run do
@@ -94,6 +100,7 @@ describe do
94
100
  tag TAG
95
101
  sqs_url SQS_URL
96
102
  max_number_of_messages 10
103
+ wait_time_seconds 10
97
104
  ]
98
105
  }
99
106
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.1
4
+ version: 1.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Odagiri
@@ -166,7 +166,8 @@ files:
166
166
  - spec/lib/fluent/plugin/in_sqs_spec.rb
167
167
  - spec/spec_helper.rb
168
168
  homepage: https://github.com/ixixi/fluent-plugin-sqs
169
- licenses: []
169
+ licenses:
170
+ - Apache-2.0
170
171
  metadata: {}
171
172
  post_install_message:
172
173
  rdoc_options: []