logstash-mixin-rabbitmq_connection 4.1.2-java → 4.1.3-java

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: a8172473666f47a825c6e32283d170aa1687c676
4
- data.tar.gz: 8f31ac4f87bc9a55cf82f64b7d1732ae3167f7d7
3
+ metadata.gz: 2ea336ab01162c3e3d4c52b822b3f843e857b5b9
4
+ data.tar.gz: 68df566879f34bcd6eef31590cb4ec5a982f20f4
5
5
  SHA512:
6
- metadata.gz: 0bdca603406eccc887d68fb7740d925a68f6ad234fecd86b529cf90133646bbead8db802a72be8dba4f7a5f4857d5a96a756b46a1e5764bf982debdf12e647f5
7
- data.tar.gz: 82f5bce851cf375cf59ea55eee435584d99f1bc03758600a0777caf52c40ccb262a584c80c8f9801f71125bb4d25901fa042e7833dce96c2a3ac83f6b5bf1131
6
+ metadata.gz: b5863c4c931266e1a7fa1f770236b82c714a943400e53da7242bb1e1761f6dc2920a14590eba8fbf88123f65c9570fd8ab868b9f4cc597dc4788e894eb7fca51
7
+ data.tar.gz: 1b9e2e6a31028ea37f6daa169384a6a572ac9dc3a0142e1fd7b3abee3ee36400c522b363ebc06ac1aabc2081810f41982a7ef995bcd99a2572e7d448f51978c1
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ * 4.1.3
2
+ - Bump march_hare version to 2.19.0 to fix reconnection failures with
3
+ proxies. See
4
+ https://github.com/logstash-plugins/logstash-input-rabbitmq/issues/76 for
5
+ more info
1
6
  * 4.1.2
2
7
  - Retry the connection attempt if there is an IO Exception.
3
8
  * 4.1.1
@@ -24,4 +29,4 @@
24
29
  * 2.0.0
25
30
  - Make LS2 compatible
26
31
  * 1.0.1
27
- - Initial Release
32
+ - Initial Release
@@ -18,8 +18,17 @@ module LogStash
18
18
  end
19
19
 
20
20
  def setup_rabbitmq_connection_config
21
- # RabbitMQ server address
22
- config :host, :validate => :string, :required => true
21
+ # RabbitMQ server address(es)
22
+ # host can either be a single host, or a list of hosts
23
+ # i.e.
24
+ # host => "localhost"
25
+ # or
26
+ # host => ["host01", "host02]
27
+ #
28
+ # if multiple hosts are provided on the initial connection and any subsequent
29
+ # recovery attempts of the hosts is chosen at random and connected to.
30
+ # Note that only one host connection is active at a time.
31
+ config :host, :validate => :string, :required => true , :list => true
23
32
 
24
33
  # RabbitMQ port to connect on
25
34
  config :port, :validate => :number, :default => 5672
@@ -99,7 +108,7 @@ module LogStash
99
108
 
100
109
  s = {
101
110
  :vhost => @vhost,
102
- :host => @host,
111
+ :hosts => @host,
103
112
  :port => @port,
104
113
  :user => @user,
105
114
  :automatic_recovery => @automatic_recovery,
@@ -123,7 +132,6 @@ module LogStash
123
132
  s[:tls_certificate_password] = cert_pass
124
133
  end
125
134
 
126
-
127
135
  @rabbitmq_settings = s
128
136
  end
129
137
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'logstash-mixin-rabbitmq_connection'
4
- s.version = '4.1.2'
4
+ s.version = '4.1.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Common functionality for RabbitMQ plugins"
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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -17,7 +17,7 @@ Gem::Specification.new do |s|
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
18
 
19
19
  s.platform = RUBY_PLATFORM
20
- s.add_runtime_dependency 'march_hare', ['~> 2.15.0'] #(MIT license)
20
+ s.add_runtime_dependency 'march_hare', ['~> 2.19.0'] #(MIT license)
21
21
  s.add_runtime_dependency 'stud', '~> 0.0.22'
22
22
 
23
23
  s.add_development_dependency 'logstash-devutils'
@@ -58,6 +58,32 @@ describe LogStash::PluginMixins::RabbitMQConnection do
58
58
  it "should set tls_certificate_password to the expected value" do
59
59
  expect(instance.rabbitmq_settings[:tls_certificate_password]).to eql(rabbitmq_settings["ssl_certificate_password"])
60
60
  end
61
+
62
+ it "should set hosts to the expected value " do
63
+ expect(instance.rabbitmq_settings[:hosts][0]).to eql(host)
64
+ end
65
+
66
+ it "should only insert a single host entry" do
67
+ expect(instance.rabbitmq_settings[:hosts].length).to eql(1)
68
+ end
69
+ end
70
+
71
+ describe "rabbitmq_settings multiple hosts" do
72
+ let(:file) { Stud::Temporary.file }
73
+ let(:path) { file.path }
74
+ after { File.unlink(path)}
75
+
76
+ let(:rabbitmq_settings) { super.merge({"host" => ["host01", "host02", "host03"]}) }
77
+
78
+ it "should set hosts to the expected value" do
79
+ expect(instance.rabbitmq_settings[:hosts][0]).to eql("host01")
80
+ expect(instance.rabbitmq_settings[:hosts][1]).to eql("host02")
81
+ expect(instance.rabbitmq_settings[:hosts][2]).to eql("host03")
82
+ end
83
+
84
+ it "should insert 3 host entries" do
85
+ expect(instance.rabbitmq_settings[:hosts].length).to eql(3)
86
+ end
61
87
  end
62
88
 
63
89
  context "when connected" do
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-mixin-rabbitmq_connection
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.2
4
+ version: 4.1.3
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - "~>"
17
17
  - !ruby/object:Gem::Version
18
- version: 2.15.0
18
+ version: 2.19.0
19
19
  name: march_hare
20
20
  prerelease: false
21
21
  type: :runtime
@@ -23,7 +23,7 @@ dependencies:
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.15.0
26
+ version: 2.19.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  requirement: !ruby/object:Gem::Requirement
29
29
  requirements: