logstash-integration-rabbitmq 7.0.2-java → 7.0.3-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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6997aa19019326916e120623107352d7ba274e8370312017561cb4fae3a2e064
|
4
|
+
data.tar.gz: 3fc3f9aff8d9700f233392a7311637f0b78d26c66681d8e83f1b52e991285c72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0265553a26b422764bd45d9f3e0599d39f391f98a2effcc20a171f30b4219869d831cb54519142dc4ee8b4a3aabf47135548e4e69d327fc780f80a0fe766ac
|
7
|
+
data.tar.gz: 28255006283a7f813b7336732bd99e0c5c32a27e53f3464cc2686ab514895c4cf5cbe772245ace33c564277115ffac64ff4c864c70c8eeabdb95224278f24b6b
|
data/CHANGELOG.md
CHANGED
@@ -2,8 +2,6 @@
|
|
2
2
|
require_relative '../plugin_mixins/rabbitmq_connection'
|
3
3
|
require 'logstash/inputs/threadable'
|
4
4
|
require 'logstash/event'
|
5
|
-
java_import java.util.concurrent.ArrayBlockingQueue
|
6
|
-
java_import java.util.concurrent.TimeUnit
|
7
5
|
|
8
6
|
module LogStash
|
9
7
|
module Inputs
|
@@ -59,6 +57,9 @@ module LogStash
|
|
59
57
|
# Additionally, any message headers will be saved in the
|
60
58
|
# `[@metadata][rabbitmq_headers]` field.
|
61
59
|
class RabbitMQ < LogStash::Inputs::Threadable
|
60
|
+
|
61
|
+
java_import java.util.concurrent.TimeUnit
|
62
|
+
|
62
63
|
include ::LogStash::PluginMixins::RabbitMQConnection
|
63
64
|
|
64
65
|
# The properties to extract from each message and store in a
|
@@ -1,14 +1,12 @@
|
|
1
1
|
# encoding: UTF-8
|
2
2
|
require "logstash/pipeline"
|
3
3
|
require_relative '../plugin_mixins/rabbitmq_connection'
|
4
|
-
java_import java.util.concurrent.TimeoutException
|
5
|
-
java_import com.rabbitmq.client.AlreadyClosedException
|
6
4
|
|
7
5
|
require 'back_pressure'
|
8
6
|
|
9
7
|
# Push events to a RabbitMQ exchange. Requires RabbitMQ 2.x
|
10
8
|
# or later version (3.x is recommended).
|
11
|
-
#
|
9
|
+
#
|
12
10
|
# Relevant links:
|
13
11
|
#
|
14
12
|
# * http://www.rabbitmq.com/[RabbitMQ]
|
@@ -16,10 +14,14 @@ require 'back_pressure'
|
|
16
14
|
module LogStash
|
17
15
|
module Outputs
|
18
16
|
class RabbitMQ < LogStash::Outputs::Base
|
17
|
+
|
18
|
+
java_import java.util.concurrent.TimeoutException
|
19
|
+
java_import com.rabbitmq.client.AlreadyClosedException
|
20
|
+
|
19
21
|
include LogStash::PluginMixins::RabbitMQConnection
|
20
22
|
|
21
23
|
config_name "rabbitmq"
|
22
|
-
|
24
|
+
|
23
25
|
concurrency :shared
|
24
26
|
|
25
27
|
# The default codec for this plugin is JSON. You can override this to suit your particular needs however.
|
@@ -128,4 +130,4 @@ module LogStash
|
|
128
130
|
end
|
129
131
|
end
|
130
132
|
end
|
131
|
-
end
|
133
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-integration-rabbitmq'
|
3
|
-
s.version = '7.0.
|
3
|
+
s.version = '7.0.3'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Integration with RabbitMQ - input and output plugins"
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline "+
|
@@ -47,7 +47,7 @@ Gem::Specification.new do |s|
|
|
47
47
|
s.add_runtime_dependency 'stud', '~> 0.0.22'
|
48
48
|
s.add_runtime_dependency 'back_pressure', '~> 1.0'
|
49
49
|
|
50
|
-
s.add_development_dependency 'logstash-devutils'
|
50
|
+
s.add_development_dependency 'logstash-devutils', '~>2.0'
|
51
51
|
s.add_development_dependency 'logstash-input-generator'
|
52
52
|
s.add_development_dependency 'logstash-codec-plain'
|
53
53
|
end
|
@@ -129,9 +129,10 @@ describe LogStash::Inputs::RabbitMQ do
|
|
129
129
|
end
|
130
130
|
end
|
131
131
|
|
132
|
-
describe "with a live server", :integration => true do
|
132
|
+
describe "LogStash::Inputs::RabbitMQ with a live server", :integration => true do
|
133
133
|
let(:klass) { LogStash::Inputs::RabbitMQ }
|
134
|
-
let(:
|
134
|
+
let(:rabbitmq_host) { ENV["RABBITMQ_HOST"] || "127.0.0.1" }
|
135
|
+
let(:config) { {"host" => rabbitmq_host, "auto_delete" => true, "codec" => "plain", "add_field" => {"[@metadata][foo]" => "bar"} } }
|
135
136
|
let(:instance) { klass.new(config) }
|
136
137
|
let(:hare_info) { instance.instance_variable_get(:@hare_info) }
|
137
138
|
let(:output_queue) { Queue.new }
|
@@ -237,7 +238,7 @@ describe "with a live server", :integration => true do
|
|
237
238
|
expect(event).to include("@metadata")
|
238
239
|
expect(event.get("@metadata")).to include("rabbitmq_properties")
|
239
240
|
|
240
|
-
props = event.get("[@metadata][rabbitmq_properties")
|
241
|
+
props = event.get("[@metadata][rabbitmq_properties]")
|
241
242
|
expect(props["app-id"]).to eq(app_id)
|
242
243
|
expect(props["delivery-mode"]).to eq(1)
|
243
244
|
expect(props["exchange"]).to eq(exchange_name)
|
@@ -274,6 +275,7 @@ describe "with a live server", :integration => true do
|
|
274
275
|
end
|
275
276
|
|
276
277
|
describe LogStash::Inputs::RabbitMQ do
|
278
|
+
require "logstash/devutils/rspec/shared_examples"
|
277
279
|
it_behaves_like "an interruptible input plugin"
|
278
280
|
end
|
279
281
|
end
|
@@ -2,7 +2,6 @@
|
|
2
2
|
require "logstash/devutils/rspec/spec_helper"
|
3
3
|
require "logstash/pipeline"
|
4
4
|
require "logstash/outputs/rabbitmq"
|
5
|
-
java_import java.util.concurrent.TimeoutException
|
6
5
|
|
7
6
|
describe LogStash::Outputs::RabbitMQ do
|
8
7
|
let(:klass) { LogStash::Outputs::RabbitMQ }
|
@@ -124,7 +123,7 @@ describe LogStash::Outputs::RabbitMQ do
|
|
124
123
|
end
|
125
124
|
|
126
125
|
context 'when it is a TimeoutException' do
|
127
|
-
let(:exception) { TimeoutException.new }
|
126
|
+
let(:exception) { java.util.concurrent.TimeoutException.new }
|
128
127
|
it_behaves_like 'recovers from exception gracefully'
|
129
128
|
end
|
130
129
|
end
|
@@ -133,14 +132,15 @@ describe LogStash::Outputs::RabbitMQ do
|
|
133
132
|
end
|
134
133
|
|
135
134
|
|
136
|
-
describe "with a live server", :integration => true do
|
135
|
+
describe "LogStash::Outputs::RabbitMQ with a live server", :integration => true do
|
136
|
+
let(:rabbitmq_host) { ENV["RABBITMQ_HOST"] || "127.0.0.1" }
|
137
137
|
let(:klass) { LogStash::Outputs::RabbitMQ }
|
138
138
|
let(:exchange) { "myexchange" }
|
139
139
|
let(:exchange_type) { "topic" }
|
140
140
|
let(:priority) { 34 }
|
141
141
|
let(:default_plugin_config) {
|
142
142
|
{
|
143
|
-
"host" =>
|
143
|
+
"host" => rabbitmq_host,
|
144
144
|
"exchange" => exchange,
|
145
145
|
"exchange_type" => exchange_type,
|
146
146
|
"key" => "foo",
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-integration-rabbitmq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.0.
|
4
|
+
version: 7.0.3
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,17 +103,17 @@ dependencies:
|
|
103
103
|
- !ruby/object:Gem::Dependency
|
104
104
|
requirement: !ruby/object:Gem::Requirement
|
105
105
|
requirements:
|
106
|
-
- - "
|
106
|
+
- - "~>"
|
107
107
|
- !ruby/object:Gem::Version
|
108
|
-
version: '0'
|
108
|
+
version: '2.0'
|
109
109
|
name: logstash-devutils
|
110
110
|
prerelease: false
|
111
111
|
type: :development
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
|
-
- - "
|
114
|
+
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '0'
|
116
|
+
version: '2.0'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
requirement: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
@@ -218,7 +218,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: '0'
|
219
219
|
requirements: []
|
220
220
|
rubyforge_project:
|
221
|
-
rubygems_version: 2.6.
|
221
|
+
rubygems_version: 2.6.13
|
222
222
|
signing_key:
|
223
223
|
specification_version: 4
|
224
224
|
summary: Integration with RabbitMQ - input and output plugins
|