fluent-plugin-sqs 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +2 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/out_sqs.rb +7 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a8d3b52c8bf79077f548c1bddbaf82a2a7d2a02
|
4
|
+
data.tar.gz: 42669b175eb27847f5b6c50133da2fe59ff49c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a0e3f5779c0b1057aeecd70b7526b2f4f4d1f5974fde8301129aab1152faab894d83f102af24516e1151d42a2bae3f2968b979ccdfb93e51eb3b8091a8a2131
|
7
|
+
data.tar.gz: d7e054e148de527908a8c0c8cf794a35ef31139c95d29d98a849b898660dd3a696ce1e5ef10cec2cbff220586833aa8b17e4eb44a872fdcc54c0fb0be07bc873
|
data/README.rdoc
CHANGED
@@ -32,6 +32,7 @@ Read events from from amazon SQS.
|
|
32
32
|
|
33
33
|
# following attibutes are optional
|
34
34
|
|
35
|
+
create_queue {boolean}
|
35
36
|
sqs_endpoint {endpointURL}
|
36
37
|
|
37
38
|
### endpoint list ###
|
@@ -48,6 +49,7 @@ Read events from from amazon SQS.
|
|
48
49
|
include_tag {boolean}
|
49
50
|
tag_property_name {tag's property name in json}
|
50
51
|
|
52
|
+
|
51
53
|
</match>
|
52
54
|
|
53
55
|
=== SQSInput
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.1
|
@@ -15,11 +15,11 @@ module Fluent
|
|
15
15
|
config_param :aws_key_id, :string, :default => nil
|
16
16
|
config_param :aws_sec_key, :string, :default => nil
|
17
17
|
config_param :queue_name, :string
|
18
|
+
config_param :create_queue, :bool, :default => true
|
18
19
|
config_param :sqs_endpoint, :string, :default => 'sqs.ap-northeast-1.amazonaws.com'
|
19
20
|
config_param :delay_seconds, :integer, :default => 0
|
20
21
|
config_param :include_tag, :bool, :default => true
|
21
22
|
config_param :tag_property_name, :string, :default => '__tag'
|
22
|
-
#config_param :buffer_queue_limit, :integer, :default => 10
|
23
23
|
|
24
24
|
def configure(conf)
|
25
25
|
super
|
@@ -34,8 +34,11 @@ module Fluent
|
|
34
34
|
|
35
35
|
@sqs = AWS::SQS.new(
|
36
36
|
:sqs_endpoint => @sqs_endpoint)
|
37
|
-
@
|
38
|
-
|
37
|
+
if @create_queue then
|
38
|
+
@queue = @sqs.queues.create(@queue_name)
|
39
|
+
else
|
40
|
+
@queue = @sqs.queues.named(@queue_name)
|
41
|
+
end
|
39
42
|
end
|
40
43
|
|
41
44
|
def shutdown
|
@@ -54,11 +57,7 @@ module Fluent
|
|
54
57
|
records = []
|
55
58
|
chunk.msgpack_each {|record| records << { :message_body => record.to_json, :delay_seconds => @delay_seconds } }
|
56
59
|
until records.length <= 0 do
|
57
|
-
|
58
|
-
@queue.batch_send(records.slice!(0..9))
|
59
|
-
rescue => e
|
60
|
-
$stderr.puts e
|
61
|
-
end
|
60
|
+
@queue.batch_send(records.slice!(0..9))
|
62
61
|
end
|
63
62
|
end
|
64
63
|
end
|