logstash-input-jsqs 0.9.3-java → 0.10.0-java

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: d979e85f39eb370f576729f26da27487765c59de
4
- data.tar.gz: 057ee4a801cc1c4924b0e265bb4f6ed760cf4caa
3
+ metadata.gz: 666a51b3b362150191760150bfd6cbf65e2f5d56
4
+ data.tar.gz: 5c79d19c024ec1abe020bb996aa525a1cbbc7dd3
5
5
  SHA512:
6
- metadata.gz: db68394687fb7aec192e33ec6f309b9e9de0c08b2b3a96c837eec42e4b495913d0f0dcc76fb13326e495165015f44e84692af9aa3ac3dce2615608d7139eec01
7
- data.tar.gz: 08dd16e9e26b56728eab680c9ff77e340c56478c478f0e10a624074bbecb0028552357e8c566adb4ac5f74629e1aff8aa258e14d91a177c5c9de9070ec8159ac
6
+ metadata.gz: 6edeb9bc0237b0d14e84ef400d98355f8d38b52c6154aaf1f3ac6649b280d7622cadf358b073f0454c50e9af39e25c3af1f2f2d89f6bb14413fc03fba0089a1f
7
+ data.tar.gz: 74abb5cc090f3c4c73a26bba82cbdee43024a238a02536bf29b49a1177fc4baece9f5619b45b92cf4d71342047dac5fe7be7fea9295cac4bcae598c659800aa8
@@ -8,6 +8,7 @@ java_import "com.amazonaws.services.sqs.model.DeleteMessageBatchRequestEntry"
8
8
  java_import "java.util.concurrent.Executors"
9
9
  java_import "java.util.concurrent.atomic.AtomicInteger"
10
10
  java_import "com.amazonaws.ClientConfiguration"
11
+ java_import "com.amazonaws.auth.profile.ProfileCredentialsProvider"
11
12
  java_import "com.amazonaws.services.sqs.AmazonSQSAsyncClient"
12
13
  java_import "com.amazonaws.services.sqs.buffered.AmazonSQSBufferedAsyncClient"
13
14
  java_import "com.amazonaws.services.sqs.buffered.QueueBufferConfig"
@@ -71,6 +71,7 @@ class LogStash::Inputs::JSQS < LogStash::Inputs::Threadable
71
71
  config :max_done_receive_batches, :validate => :number, :default => 50
72
72
  config :max_number_of_messages, :validate => :number, :default => 10
73
73
  config :retry_count, :validate => :number, :default => 5
74
+ config :aws_profile, :validate => :string, :default => "default"
74
75
 
75
76
  @receiveRequest
76
77
 
@@ -80,16 +81,18 @@ class LogStash::Inputs::JSQS < LogStash::Inputs::Threadable
80
81
 
81
82
  # Client config
82
83
  @logger.debug("Creating AWS SQS queue client", :queue => @queue)
83
- clientConfig = ClientConfiguration.new.withMaxConnections(@max_connections)
84
+ sqsClientConfig = ClientConfiguration.new.withMaxConnections(@max_connections)
85
+ ## TODO: This should be more flexible to support multiple auth methods
86
+ awsCredentials = ProfileCredentialsProvider.new(@aws_profile)
84
87
 
85
88
  # SQS client
86
- @sqs = AmazonSQSAsyncClient.new(clientConfig)
89
+ @sqs = AmazonSQSAsyncClient.new(awsCredentials, sqsClientConfig)
87
90
  @logger.debug("Amazon SQS Client created")
88
91
 
89
92
  # Buffered client config
90
- queueBufferConfig = QueueBufferConfig.new.withMaxBatchOpenMs(@max_batch_open_ms).withMaxInflightReceiveBatches(@max_inflight_receive_batches).withMaxDoneReceiveBatches(@max_done_receive_batches)
93
+ sqsBufferConfig = QueueBufferConfig.new.withMaxBatchOpenMs(@max_batch_open_ms).withMaxInflightReceiveBatches(@max_inflight_receive_batches).withMaxDoneReceiveBatches(@max_done_receive_batches)
91
94
 
92
- @bufferedSqs = AmazonSQSBufferedAsyncClient.new(@sqs, queueBufferConfig);
95
+ @bufferedSqs = AmazonSQSBufferedAsyncClient.new(@sqs, sqsBufferConfig);
93
96
  @logger.info("Connected to AWS SQS queue successfully.", :queue => @queue)
94
97
 
95
98
  @receiveRequest = ReceiveMessageRequest.new(@queueUrl).withMaxNumberOfMessages(@max_number_of_messages)
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = RUBY_PLATFORM
3
3
  s.name = 'logstash-input-jsqs'
4
- s.version = '0.9.3'
4
+ s.version = '0.10.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "SQS input plugin using the AWS Java SDK"
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install logstash-input-jsqs. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-jsqs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.10.0
5
5
  platform: java
6
6
  authors:
7
7
  - Jamie Cressey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-17 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement