logstash-mixin-rabbitmq_connection 1.0.0.beta1-java → 1.0.0-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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9f2be467b6cb31ac7b0a07be959aabb08f7579c
|
4
|
+
data.tar.gz: ebf161c2d0bd8f40136ce42bbfc5cb7d113df268
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4fbd248d78808dee29026165e4b0a0693c2a878d63c33f5eb820a8b2e9c595ee444e38c8f7994588b5986b87c638dc4306007723b037101c6711e160392e4b7
|
7
|
+
data.tar.gz: 45c4612daca350ecfbc75ef4c706d921211f617388120ac43d5a470bb1a632fc2463174ee7db1bb754a1ec1d932d0d1ff169e91332916f99ce27450c7b806b50
|
@@ -54,18 +54,16 @@ module LogStash
|
|
54
54
|
# Extra queue arguments as an array.
|
55
55
|
# To make a RabbitMQ queue mirrored, use: `{"x-ha-policy" => "all"}`
|
56
56
|
config :arguments, :validate => :array, :default => {}
|
57
|
-
|
58
57
|
end
|
59
58
|
|
60
59
|
def conn_str
|
61
60
|
"amqp://#{@user}@#{@host}:#{@port}#{@vhost}"
|
62
61
|
end
|
63
62
|
|
64
|
-
def
|
63
|
+
def close_connection
|
64
|
+
@rabbitmq_connection_stopping = true
|
65
65
|
@hare_info.channel.close if channel_open?
|
66
66
|
@hare_info.connection.close if connection_open?
|
67
|
-
|
68
|
-
finished
|
69
67
|
end
|
70
68
|
|
71
69
|
def rabbitmq_settings
|
@@ -86,8 +84,6 @@ module LogStash
|
|
86
84
|
def connect!
|
87
85
|
@hare_info = connect() unless @hare_info # Don't duplicate the conn!
|
88
86
|
rescue MarchHare::Exception => e
|
89
|
-
return if terminating?
|
90
|
-
|
91
87
|
@logger.error("RabbitMQ connection error, will retry.",
|
92
88
|
:message => e.message,
|
93
89
|
:exception => e.class.name,
|
@@ -113,10 +109,10 @@ module LogStash
|
|
113
109
|
private
|
114
110
|
|
115
111
|
def declare_exchange!(channel, exchange, exchange_type, durable)
|
116
|
-
@logger.debug("Declaring an exchange", :name => exchange,
|
112
|
+
@logger.debug? && @logger.debug("Declaring an exchange", :name => exchange,
|
117
113
|
:type => exchange_type, :durable => durable)
|
118
114
|
exchange = channel.exchange(exchange, :type => exchange_type.to_sym, :durable => durable)
|
119
|
-
@logger.debug("Exchange declared")
|
115
|
+
@logger.debug? && @logger.debug("Exchange declared")
|
120
116
|
exchange
|
121
117
|
rescue StandardError => e
|
122
118
|
@logger.error("Could not declare exchange!",
|
@@ -140,7 +136,7 @@ module LogStash
|
|
140
136
|
end
|
141
137
|
|
142
138
|
def sleep_for_retry
|
143
|
-
|
139
|
+
Stud.stoppable_sleep(@connect_retry_interval) { @rabbitmq_connection_stopping }
|
144
140
|
end
|
145
141
|
end
|
146
142
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-mixin-rabbitmq_connection'
|
4
|
-
s.version = '1.0.0
|
4
|
+
s.version = '1.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Common functionality for RabbitMQ plugins"
|
7
7
|
s.description = "This is used to provide configuration options and connection settings for logstash plugins working with RabbitMQ"
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
|
22
22
|
s.platform = RUBY_PLATFORM
|
23
23
|
s.add_runtime_dependency 'march_hare', ['~> 2.11.0'] #(MIT license)
|
24
|
+
s.add_runtime_dependency 'stud', '~> 0.0.22'
|
24
25
|
|
25
26
|
s.add_development_dependency 'logstash-devutils'
|
26
27
|
s.add_development_dependency 'logstash-input-generator'
|
@@ -1,3 +1,4 @@
|
|
1
|
+
# encoding: utf-8
|
1
2
|
require "logstash/devutils/rspec/spec_helper"
|
2
3
|
require "logstash/pipeline"
|
3
4
|
require "logstash/plugin_mixins/rabbitmq_connection"
|
@@ -99,4 +100,4 @@ describe LogStash::PluginMixins::RabbitMQConnection do
|
|
99
100
|
expect(subject).to have_received(:sleep_for_retry).once
|
100
101
|
end
|
101
102
|
end
|
102
|
-
end
|
103
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-mixin-rabbitmq_connection
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,6 +44,20 @@ dependencies:
|
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: 2.11.0
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
requirements:
|
50
|
+
- - "~>"
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.0.22
|
53
|
+
name: stud
|
54
|
+
prerelease: false
|
55
|
+
type: :runtime
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: 0.0.22
|
47
61
|
- !ruby/object:Gem::Dependency
|
48
62
|
requirement: !ruby/object:Gem::Requirement
|
49
63
|
requirements:
|
@@ -113,9 +127,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
113
127
|
version: '0'
|
114
128
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
129
|
requirements:
|
116
|
-
- - "
|
130
|
+
- - ">="
|
117
131
|
- !ruby/object:Gem::Version
|
118
|
-
version:
|
132
|
+
version: '0'
|
119
133
|
requirements: []
|
120
134
|
rubyforge_project:
|
121
135
|
rubygems_version: 2.4.8
|