logstash-output-jms 3.0.3 → 3.0.4
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/logstash/outputs/jms.rb +16 -5
- data/logstash-output-jms.gemspec +1 -1
- data/spec/outputs/jms_spec.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8c6884ef9fed2c5e1f52d37d32f01bcb1521381cfb1b8355a80483d6004e39a
|
4
|
+
data.tar.gz: 83dcf48a5d1851be6c39b55992f98c72140dab4fd55046b037a328d5a952b25b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0b8b4672024ffa12932af9562dfc7e365b818624887893317642a0bf40eceb8cb881787168e00e715adcd6908b035f4278d571b9028773bdde769b0dfc86fcf
|
7
|
+
data.tar.gz: 296bf31b7e15bf1ca755060b94f62f59ede467132ed363d22fcb736d5a2aeee8d03f82735b27b8dab810307b027fc9fa406e7688d8ff2a0962644beaa5b5fd79
|
data/CHANGELOG.md
CHANGED
data/lib/logstash/outputs/jms.rb
CHANGED
@@ -23,7 +23,7 @@ class LogStash::Outputs::Jms < LogStash::Outputs::Base
|
|
23
23
|
|
24
24
|
# Name of delivery mode to use
|
25
25
|
# Options are "persistent" and "non_persistent" if not defined nothing will be passed.
|
26
|
-
config :delivery_mode, :validate =>
|
26
|
+
config :delivery_mode, :validate => %w(persistent non_persistent)
|
27
27
|
|
28
28
|
# If pub-sub (topic) style should be used or not.
|
29
29
|
# Mandatory
|
@@ -95,16 +95,27 @@ config :jndi_context, :validate => :hash
|
|
95
95
|
end
|
96
96
|
|
97
97
|
@logger.debug("JMS Config being used", :context => @jms_config)
|
98
|
-
|
98
|
+
begin
|
99
|
+
# The jruby-jms adapter dynamically loads the Java classes that it extends, and may fail
|
100
|
+
@connection = JMS::Connection.new(@jms_config)
|
101
|
+
rescue NameError => ne
|
102
|
+
if @require_jars && !@require_jars.empty?
|
103
|
+
logger.warn('The `require_jars` directive was provided, but may not correctly map to a JNS provider', :require_jars => @require_jars)
|
104
|
+
end
|
105
|
+
logger.error('Failed to load JMS Connection, likely because a JMS Provider is not on the Logstash classpath '+
|
106
|
+
'or correctly specified by the plugin\'s `require_jars` directive', :exception => ne.message, :backtrace => ne.backtrace)
|
107
|
+
fail(LogStash::PluginLoadingError, 'JMS Input failed to load, likely because a JMS provider was not available')
|
108
|
+
end
|
109
|
+
|
99
110
|
@session = @connection.create_session()
|
100
111
|
|
101
112
|
# Cache the producer since we should keep reusing this one.
|
102
113
|
destination_key = @pub_sub ? :topic_name : :queue_name
|
103
114
|
@producer = @session.create_producer(@session.create_destination(destination_key => @destination))
|
104
115
|
|
105
|
-
|
106
|
-
|
107
|
-
|
116
|
+
# If a delivery mode has been specified, inform the producer
|
117
|
+
@producer.delivery_mode_sym = @delivery_mode.to_sym unless @delivery_mode.nil?
|
118
|
+
|
108
119
|
end # def register
|
109
120
|
|
110
121
|
def receive(event)
|
data/logstash-output-jms.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-output-jms'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.4'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Push events to a JMS topic or queue."
|
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"
|
data/spec/outputs/jms_spec.rb
CHANGED
@@ -14,6 +14,7 @@ describe "outputs/jms" do
|
|
14
14
|
|
15
15
|
context 'when initializing' do
|
16
16
|
it "should register" do
|
17
|
+
pending('JMS Provider')
|
17
18
|
output = LogStash::Plugin.lookup("output", "jms").new(jms_config)
|
18
19
|
expect {output.register}.to_not raise_error
|
19
20
|
end
|
@@ -26,6 +27,7 @@ describe "outputs/jms" do
|
|
26
27
|
|
27
28
|
context 'when outputting messages' do
|
28
29
|
it 'should send logstash event to jms queue' do
|
30
|
+
pending('JMS Provider')
|
29
31
|
jms = LogStash::Outputs::Jms.new(jms_config)
|
30
32
|
jms.register
|
31
33
|
jms.receive(event)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-jms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elasticsearch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04
|
11
|
+
date: 2018-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -125,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
125
125
|
version: '0'
|
126
126
|
requirements: []
|
127
127
|
rubyforge_project:
|
128
|
-
rubygems_version: 2.6.
|
128
|
+
rubygems_version: 2.6.13
|
129
129
|
signing_key:
|
130
130
|
specification_version: 4
|
131
131
|
summary: Push events to a JMS topic or queue.
|