logstash-output-rabbitmq 3.0.5-java → 3.0.6-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: 21c21b00c7886105e3f23422e95ffc54334b981e
4
- data.tar.gz: 48750c0ca8e8fe244811d3e0202b0e03e4810d97
3
+ metadata.gz: 499508431c1d6043a759e3534c2783d077e0e3ef
4
+ data.tar.gz: 631f1a4d271a441a63bda77157bf6a1a08b65f15
5
5
  SHA512:
6
- metadata.gz: 404b62b74ef2f829fabae350fa205ee4368814be942b76ffd439a775f7b0bd286d6829daf78056297f49a517e9db6a2a57b210888698f115b7c480d0e7a24e80
7
- data.tar.gz: 5db7986feb828719bc01c1c1e6f7a21e7b15f5bbb0b229442c3acb9670c7a4f9aa888f51b8e954a490a8ea05c8196b338934581a1da702ed52670a01eb24ad5d
6
+ metadata.gz: 516b4f63adac1153e44887cc2bbfed5968498b8011e6505c09a0787a935d5b7a7c1c63e6ccfd4d3bad479858572888425b9fb59dc5c47d0e88e44fa8abb7f5e8
7
+ data.tar.gz: 81534ed16787d512f8062857a787fb8a15aabe18394423d5444c28d863d8038e302d3afa672730c6385a21d3d3efb291159b13ac9b6c261a3ea6bc8e36fa63c5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.0.6
2
+ - Set codec to JSON if none specified to recreate old behavior
3
+
1
4
  ## 3.0.5
2
5
  - Fix broken registration of plugin
3
6
 
@@ -4,7 +4,7 @@ require "logstash/plugin_mixins/rabbitmq_connection"
4
4
 
5
5
  # Push events to a RabbitMQ exchange. Requires RabbitMQ 2.x
6
6
  # or later version (3.x is recommended).
7
- #
7
+ #
8
8
  # Relevant links:
9
9
  #
10
10
  # * http://www.rabbitmq.com/[RabbitMQ]
@@ -14,7 +14,10 @@ module LogStash
14
14
  class RabbitMQ < LogStash::Outputs::Base
15
15
  include LogStash::PluginMixins::RabbitMQConnection
16
16
 
17
- config_name("rabbitmq")
17
+ config_name "rabbitmq"
18
+
19
+ # The default codec for this plugin is JSON. You can override this to suit your particular needs however.
20
+ default :codec, "json"
18
21
 
19
22
  # Key to route to by default. Defaults to 'logstash'
20
23
  #
@@ -39,9 +42,8 @@ module LogStash
39
42
  @codec.on_event(&method(:publish))
40
43
  end
41
44
 
42
- def receive(event)
43
-
44
45
 
46
+ def receive(event)
45
47
  @codec.encode(event)
46
48
  rescue StandardError => e
47
49
  @logger.warn("Error encoding event", :exception => e, :event => event)
@@ -1,7 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
-
3
2
  s.name = 'logstash-output-rabbitmq'
4
- s.version = '3.0.5'
3
+ s.version = '3.0.6'
5
4
  s.licenses = ['Apache License (2.0)']
6
5
  s.summary = "Push events to a RabbitMQ exchange"
7
6
  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 gemname. This gem is not a stand-alone program"
@@ -21,7 +20,7 @@ Gem::Specification.new do |s|
21
20
 
22
21
  # Gem dependencies
23
22
  s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0"
24
- s.add_runtime_dependency "logstash-mixin-rabbitmq_connection", '>= 2.0.1', '< 3.0.0'
23
+ s.add_runtime_dependency "logstash-mixin-rabbitmq_connection", '>= 2.2.0', '< 3.0.0'
25
24
 
26
25
  s.platform = RUBY_PLATFORM
27
26
 
@@ -173,9 +173,9 @@ describe "with a live server", :integration => true do
173
173
  end
174
174
 
175
175
  describe "sending a message with an exchange specified" do
176
- let(:message) { LogStash::Event.new(:message => "Foo Message") }
176
+ let(:message) { LogStash::Event.new("message" => "Foo Message", "extra_field" => "Blah") }
177
177
 
178
- it "should process the message" do
178
+ before do
179
179
  @received = nil
180
180
  test_queue.subscribe do |metadata,payload|
181
181
  @received = payload
@@ -187,7 +187,11 @@ describe "with a live server", :integration => true do
187
187
  sleep 1
188
188
  end
189
189
 
190
- expect(@received).to eql(message.to_s)
190
+ @decoded = LogStash::Json.load(@received)
191
+ end
192
+
193
+ it "should process the message fully using the default (JSON) codec" do
194
+ expect(@decoded).to eql(LogStash::Json.load(LogStash::Json.dump(message)))
191
195
  end
192
196
  end
193
197
  end
metadata CHANGED
@@ -1,25 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.5
4
+ version: 3.0.6
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-23 00:00:00.000000000 Z
11
+ date: 2015-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: logstash-core
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '>='
18
- - !ruby/object:Gem::Version
19
- version: 2.0.0.beta2
20
- - - <
21
- - !ruby/object:Gem::Version
22
- version: 3.0.0
23
14
  requirement: !ruby/object:Gem::Requirement
24
15
  requirements:
25
16
  - - '>='
@@ -28,85 +19,94 @@ dependencies:
28
19
  - - <
29
20
  - !ruby/object:Gem::Version
30
21
  version: 3.0.0
22
+ name: logstash-core
31
23
  prerelease: false
32
24
  type: :runtime
33
- - !ruby/object:Gem::Dependency
34
- name: logstash-mixin-rabbitmq_connection
35
25
  version_requirements: !ruby/object:Gem::Requirement
36
26
  requirements:
37
27
  - - '>='
38
28
  - !ruby/object:Gem::Version
39
- version: 2.0.1
29
+ version: 2.0.0.beta2
40
30
  - - <
41
31
  - !ruby/object:Gem::Version
42
32
  version: 3.0.0
33
+ - !ruby/object:Gem::Dependency
43
34
  requirement: !ruby/object:Gem::Requirement
44
35
  requirements:
45
36
  - - '>='
46
37
  - !ruby/object:Gem::Version
47
- version: 2.0.1
38
+ version: 2.2.0
48
39
  - - <
49
40
  - !ruby/object:Gem::Version
50
41
  version: 3.0.0
42
+ name: logstash-mixin-rabbitmq_connection
51
43
  prerelease: false
52
44
  type: :runtime
53
- - !ruby/object:Gem::Dependency
54
- name: logstash-devutils
55
45
  version_requirements: !ruby/object:Gem::Requirement
56
46
  requirements:
57
47
  - - '>='
58
48
  - !ruby/object:Gem::Version
59
- version: '0'
49
+ version: 2.2.0
50
+ - - <
51
+ - !ruby/object:Gem::Version
52
+ version: 3.0.0
53
+ - !ruby/object:Gem::Dependency
60
54
  requirement: !ruby/object:Gem::Requirement
61
55
  requirements:
62
56
  - - '>='
63
57
  - !ruby/object:Gem::Version
64
58
  version: '0'
59
+ name: logstash-devutils
65
60
  prerelease: false
66
61
  type: :development
67
- - !ruby/object:Gem::Dependency
68
- name: logstash-input-generator
69
62
  version_requirements: !ruby/object:Gem::Requirement
70
63
  requirements:
71
64
  - - '>='
72
65
  - !ruby/object:Gem::Version
73
66
  version: '0'
67
+ - !ruby/object:Gem::Dependency
74
68
  requirement: !ruby/object:Gem::Requirement
75
69
  requirements:
76
70
  - - '>='
77
71
  - !ruby/object:Gem::Version
78
72
  version: '0'
73
+ name: logstash-input-generator
79
74
  prerelease: false
80
75
  type: :development
81
- - !ruby/object:Gem::Dependency
82
- name: logstash-codec-json
83
76
  version_requirements: !ruby/object:Gem::Requirement
84
77
  requirements:
85
78
  - - '>='
86
79
  - !ruby/object:Gem::Version
87
80
  version: '0'
81
+ - !ruby/object:Gem::Dependency
88
82
  requirement: !ruby/object:Gem::Requirement
89
83
  requirements:
90
84
  - - '>='
91
85
  - !ruby/object:Gem::Version
92
86
  version: '0'
87
+ name: logstash-codec-json
93
88
  prerelease: false
94
89
  type: :development
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
95
  description: This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program
96
96
  email: info@elastic.co
97
97
  executables: []
98
98
  extensions: []
99
99
  extra_rdoc_files: []
100
100
  files:
101
- - lib/logstash/outputs/rabbitmq.rb
102
- - spec/outputs/rabbitmq_spec.rb
103
- - logstash-output-rabbitmq.gemspec
104
- - README.md
105
101
  - CHANGELOG.md
106
102
  - CONTRIBUTORS
107
103
  - Gemfile
108
104
  - LICENSE
109
105
  - NOTICE.TXT
106
+ - README.md
107
+ - lib/logstash/outputs/rabbitmq.rb
108
+ - logstash-output-rabbitmq.gemspec
109
+ - spec/outputs/rabbitmq_spec.rb
110
110
  homepage: http://www.elastic.co/guide/en/logstash/current/index.html
111
111
  licenses:
112
112
  - Apache License (2.0)
@@ -129,9 +129,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
129
129
  version: '0'
130
130
  requirements: []
131
131
  rubyforge_project:
132
- rubygems_version: 2.1.9
132
+ rubygems_version: 2.4.8
133
133
  signing_key:
134
134
  specification_version: 4
135
135
  summary: Push events to a RabbitMQ exchange
136
136
  test_files:
137
137
  - spec/outputs/rabbitmq_spec.rb
138
+ has_rdoc: