fluent-plugin-sqs 1.4.4 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a2b6434755f9e7dc8ff13a889cf1b1aeb0549f8f
4
+ data.tar.gz: 3b72c3efb1ebd353b50c466c841977c098f934e8
5
+ SHA512:
6
+ metadata.gz: faca46f1ad633a02b584609e298275a768afcb027672c3d09d11a41fb3c0acd5c56175fd2449e79e3ff567670b462008ea27cc38950272d6b7336ac2d858df77
7
+ data.tar.gz: 3266b3ebfcc90b4c5a0e0a665d86b12ae07c4cce37b559ed3071d9618e005e500a82b1ce4e88a9a81f3f415abf386e2023a41e1daca806977869c9d00818e310
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.4
1
+ 1.5.0
@@ -15,6 +15,7 @@ module Fluent
15
15
  config_param :sqs_endpoint, :string, :default => 'sqs.ap-northeast-1.amazonaws.com'
16
16
  config_param :sqs_url, :string
17
17
  config_param :receive_interval, :time, :default => 1
18
+ config_param :max_number_of_messages, :integer, :default => 1
18
19
 
19
20
  def configure(conf)
20
21
  super
@@ -46,7 +47,7 @@ module Fluent
46
47
  until @finished
47
48
  begin
48
49
  sleep @receive_interval
49
- @queue.receive_message do |message|
50
+ @queue.receive_message(:limit => @max_number_of_messages) do |message|
50
51
  record = {}
51
52
  record['body'] = message.body.to_s
52
53
  record['handle'] = message.handle.to_s
@@ -14,6 +14,7 @@ describe do
14
14
  aws_sec_key AWS_SEC_KEY
15
15
  tag TAG
16
16
  sqs_url SQS_URL
17
+ max_number_of_messages 10
17
18
  ]
18
19
  }
19
20
 
@@ -41,6 +42,11 @@ describe do
41
42
  subject {instance.receive_interval}
42
43
  it{should == 1}
43
44
  end
45
+
46
+ context do
47
+ subject {instance.max_number_of_messages}
48
+ it{should == 10}
49
+ end
44
50
  end
45
51
 
46
52
  describe 'emit' do
@@ -57,7 +63,7 @@ describe do
57
63
  allow(Time).to receive(:now).and_return(0)
58
64
 
59
65
  class AWS::SQS::Queue
60
- def receive_message
66
+ def receive_message(opts)
61
67
  yield OpenStruct.new(
62
68
  { 'body' => 'body',
63
69
  'handle' => 'handle',
@@ -69,11 +75,13 @@ describe do
69
75
  })
70
76
  end
71
77
  end
78
+ expect_any_instance_of(AWS::SQS::Queue).to receive(:receive_message).with({:limit => 10}).at_least(:once).and_call_original
79
+
72
80
  d = driver
73
81
  d.run do
74
82
  sleep 2
75
83
  end
76
-
84
+
77
85
  d.emits
78
86
  }
79
87
 
@@ -84,6 +92,7 @@ describe do
84
92
  aws_sec_key AWS_SEC_KEY
85
93
  tag TAG
86
94
  sqs_url SQS_URL
95
+ max_number_of_messages 10
87
96
  ]
88
97
  }
89
98
 
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-sqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.4
5
- prerelease:
4
+ version: 1.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Yuri Odagiri
@@ -14,129 +13,113 @@ dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: fluentd
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.10.0
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.10.0
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: aws-sdk
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
33
  version: 1.9.5
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
40
  version: 1.9.5
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: bundler
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: rake
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ! '>='
59
+ - - ">="
68
60
  - !ruby/object:Gem::Version
69
61
  version: '0'
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ! '>='
66
+ - - ">="
76
67
  - !ruby/object:Gem::Version
77
68
  version: '0'
78
69
  - !ruby/object:Gem::Dependency
79
70
  name: rspec
80
71
  requirement: !ruby/object:Gem::Requirement
81
- none: false
82
72
  requirements:
83
- - - ! '>='
73
+ - - ">="
84
74
  - !ruby/object:Gem::Version
85
75
  version: '0'
86
76
  type: :development
87
77
  prerelease: false
88
78
  version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
79
  requirements:
91
- - - ! '>='
80
+ - - ">="
92
81
  - !ruby/object:Gem::Version
93
82
  version: '0'
94
83
  - !ruby/object:Gem::Dependency
95
84
  name: rr
96
85
  requirement: !ruby/object:Gem::Requirement
97
- none: false
98
86
  requirements:
99
- - - ! '>='
87
+ - - ">="
100
88
  - !ruby/object:Gem::Version
101
89
  version: '0'
102
90
  type: :development
103
91
  prerelease: false
104
92
  version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
93
  requirements:
107
- - - ! '>='
94
+ - - ">="
108
95
  - !ruby/object:Gem::Version
109
96
  version: '0'
110
97
  - !ruby/object:Gem::Dependency
111
98
  name: pry
112
99
  requirement: !ruby/object:Gem::Requirement
113
- none: false
114
100
  requirements:
115
- - - ! '>='
101
+ - - ">="
116
102
  - !ruby/object:Gem::Version
117
103
  version: '0'
118
104
  type: :development
119
105
  prerelease: false
120
106
  version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
107
  requirements:
123
- - - ! '>='
108
+ - - ">="
124
109
  - !ruby/object:Gem::Version
125
110
  version: '0'
126
111
  - !ruby/object:Gem::Dependency
127
112
  name: jeweler
128
113
  requirement: !ruby/object:Gem::Requirement
129
- none: false
130
114
  requirements:
131
- - - ! '>='
115
+ - - ">="
132
116
  - !ruby/object:Gem::Version
133
117
  version: '0'
134
118
  type: :development
135
119
  prerelease: false
136
120
  version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
121
  requirements:
139
- - - ! '>='
122
+ - - ">="
140
123
  - !ruby/object:Gem::Version
141
124
  version: '0'
142
125
  description:
@@ -147,34 +130,33 @@ extra_rdoc_files:
147
130
  - README.rdoc
148
131
  files:
149
132
  - AUTHORS
133
+ - README.rdoc
150
134
  - Rakefile
151
135
  - VERSION
152
136
  - lib/fluent/plugin/in_sqs.rb
153
137
  - lib/fluent/plugin/out_sqs.rb
154
138
  - spec/lib/fluent/plugin/in_sqs_spec.rb
155
139
  - spec/spec_helper.rb
156
- - README.rdoc
157
140
  homepage: https://github.com/ixixi/fluent-plugin-sqs
158
141
  licenses: []
142
+ metadata: {}
159
143
  post_install_message:
160
144
  rdoc_options: []
161
145
  require_paths:
162
146
  - lib
163
147
  required_ruby_version: !ruby/object:Gem::Requirement
164
- none: false
165
148
  requirements:
166
- - - ! '>='
149
+ - - ">="
167
150
  - !ruby/object:Gem::Version
168
151
  version: '0'
169
152
  required_rubygems_version: !ruby/object:Gem::Requirement
170
- none: false
171
153
  requirements:
172
- - - ! '>='
154
+ - - ">="
173
155
  - !ruby/object:Gem::Version
174
156
  version: '0'
175
157
  requirements: []
176
158
  rubyforge_project:
177
- rubygems_version: 1.8.23.2
159
+ rubygems_version: 2.4.1
178
160
  signing_key:
179
161
  specification_version: 3
180
162
  summary: Amazon SQS input/output plugin for Fluent event collector