jruby-jms 1.2.0-java → 1.3.0-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 +5 -5
- data/README.md +17 -20
- data/lib/jms/connection.rb +2 -5
- data/lib/jms/message_consumer.rb +18 -3
- data/lib/jms/message_listener_impl.rb +1 -1
- data/lib/jms/version.rb +1 -1
- data/test/test_helper.rb +2 -2
- metadata +17 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '07213922daa10ccc443fc32e7adb462a83f691b1b3af0888ef77028a929db96f'
|
4
|
+
data.tar.gz: ebaa48906a3c4f47f3f833b0e614f68f23383c0a4583ddf7445d86be7cdcbcfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54ad524cf822636ab016255214ad4f3928bc7f5ed6dcfe8b76a02972cac6a130d551dee388b03e800ea2c975b4dcf03d14d7c8bf20d2a16392b53f752343cf3f
|
7
|
+
data.tar.gz: b9624872fa1b776923df58d15896fb3296aed65088ae2d7428d519a4804966481302f5898fdfce4c5b71e59f77147ceda5d7f0d658dc73ea6a2717170e4d0fb3
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
|
1
|
+
# jruby-jms
|
2
|
+
 
|
2
3
|
|
3
4
|
* http://github.com/reidmorrison/jruby-jms
|
4
5
|
|
@@ -160,9 +161,17 @@ queue or topic will be passed to the block.
|
|
160
161
|
|
161
162
|
## Logging
|
162
163
|
|
163
|
-
jruby-jms
|
164
|
-
|
165
|
-
|
164
|
+
jruby-jms uses [Semantic Logger](http://reidmorrison.github.io/semantic_logger/) for logging since it is
|
165
|
+
fully thread-aware, uses in-memory queue based logging for performance, and has several other useful features.
|
166
|
+
|
167
|
+
To enable Semantic Logger in a rails logger, include the gem [rails_semantic_logger](http://reidmorrison.github.io/semantic_logger/rails.html)
|
168
|
+
|
169
|
+
For standalone installations:
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
SemanticLogger.add_appender(file_name: 'test.log', formatter: :color)
|
173
|
+
SemanticLogger.default_level = :info
|
174
|
+
```
|
166
175
|
|
167
176
|
## Dependencies
|
168
177
|
|
@@ -184,22 +193,10 @@ jruby-jms has been tested against JRuby 1.7, and JRuby 9.0.0.0
|
|
184
193
|
|
185
194
|
## Versioning
|
186
195
|
|
187
|
-
|
188
|
-
|
189
|
-
Reid Morrison :: reidmo@gmail.com :: @reidmorrison
|
190
|
-
|
191
|
-
## License
|
196
|
+
This project uses [Semantic Versioning](http://semver.org/).
|
192
197
|
|
193
|
-
|
194
|
-
|
195
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
196
|
-
you may not use this file except in compliance with the License.
|
197
|
-
You may obtain a copy of the License at
|
198
|
+
## Author
|
198
199
|
|
199
|
-
|
200
|
+
[Reid Morrison](https://github.com/reidmorrison)
|
200
201
|
|
201
|
-
|
202
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
203
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
204
|
-
See the License for the specific language governing permissions and
|
205
|
-
limitations under the License.
|
202
|
+
[Contributors](https://github.com/reidmorrison/jruby-jms/graphs/contributors)
|
data/lib/jms/connection.rb
CHANGED
@@ -483,17 +483,14 @@ module JMS
|
|
483
483
|
# see regular session parameters from: JMS::Connection#initialize
|
484
484
|
#
|
485
485
|
# Additional parameters for controlling the session pool itself
|
486
|
-
# :pool_name Name of the pool as it shows up in the logger.
|
487
|
-
# Default: 'JMS::SessionPool'
|
488
486
|
# :pool_size Maximum Pool Size. Default: 10
|
489
487
|
# The pool only grows as needed and will never exceed
|
490
488
|
# :pool_size
|
491
489
|
# :pool_warn_timeout Number of seconds to wait before logging a warning when a
|
492
490
|
# session in the pool is not available. Measured in seconds
|
493
491
|
# Default: 5.0
|
494
|
-
# :
|
495
|
-
#
|
496
|
-
# Default: None
|
492
|
+
# :pool_name Name of the pool as it shows up in the logger.
|
493
|
+
# Default: 'JMS::SessionPool'
|
497
494
|
# Example:
|
498
495
|
# session_pool = connection.create_session_pool(config)
|
499
496
|
#
|
data/lib/jms/message_consumer.rb
CHANGED
@@ -9,14 +9,29 @@ module JMS::MessageConsumer
|
|
9
9
|
# Note: Messages may still be on the queue, but the broker has not supplied any messages
|
10
10
|
# in the time interval specified
|
11
11
|
# Default: 0
|
12
|
+
# :buffered_message - consume Oracle AQ buffered message
|
13
|
+
# Default: false
|
12
14
|
def get(params={})
|
13
15
|
timeout = params[:timeout] || 0
|
16
|
+
buffered_message = params[:buffered_message] || false
|
14
17
|
if timeout == -1
|
15
|
-
|
18
|
+
if buffered_message
|
19
|
+
self.bufferReceive
|
20
|
+
else
|
21
|
+
self.receive
|
22
|
+
end
|
16
23
|
elsif timeout == 0
|
17
|
-
|
24
|
+
if buffered_message
|
25
|
+
self.bufferReceiveNoWait
|
26
|
+
else
|
27
|
+
self.receiveNoWait
|
28
|
+
end
|
18
29
|
else
|
19
|
-
|
30
|
+
if buffered_message
|
31
|
+
self.bufferReceive(timeout)
|
32
|
+
else
|
33
|
+
self.receive(timeout)
|
34
|
+
end
|
20
35
|
end
|
21
36
|
end
|
22
37
|
|
data/lib/jms/version.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -11,8 +11,8 @@ require 'jms'
|
|
11
11
|
|
12
12
|
Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
|
13
13
|
|
14
|
-
SemanticLogger.add_appender('test.log',
|
15
|
-
SemanticLogger.default_level
|
14
|
+
SemanticLogger.add_appender(file_name: 'test.log', formatter: :color)
|
15
|
+
SemanticLogger.default_level = :trace
|
16
16
|
|
17
17
|
# Set Log4J properties file so that it does not need to be in the CLASSPATH
|
18
18
|
java.lang.System.properties['log4j.configuration'] = 'test/log4j.properties'
|
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jruby-jms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-06 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
18
|
version: '0'
|
19
19
|
name: gene_pool
|
@@ -21,13 +21,13 @@ dependencies:
|
|
21
21
|
type: :runtime
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '0'
|
33
33
|
name: semantic_logger
|
@@ -35,10 +35,11 @@ dependencies:
|
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: jruby-jms is a complete JRuby API into Java Messaging Specification (JMS)
|
41
|
+
description: jruby-jms is a complete JRuby API into Java Messaging Specification (JMS)
|
42
|
+
V1.1. For JRuby only.
|
42
43
|
email:
|
43
44
|
- reidmo@gmail.com
|
44
45
|
executables: []
|
@@ -75,7 +76,7 @@ files:
|
|
75
76
|
- test/test_helper.rb
|
76
77
|
homepage: https://github.com/reidmorrison/jruby-jms
|
77
78
|
licenses:
|
78
|
-
- Apache
|
79
|
+
- Apache-2.0
|
79
80
|
metadata: {}
|
80
81
|
post_install_message:
|
81
82
|
rdoc_options: []
|
@@ -83,25 +84,25 @@ require_paths:
|
|
83
84
|
- lib
|
84
85
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
86
|
requirements:
|
86
|
-
- -
|
87
|
+
- - ">="
|
87
88
|
- !ruby/object:Gem::Version
|
88
89
|
version: '0'
|
89
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
91
|
requirements:
|
91
|
-
- -
|
92
|
+
- - ">="
|
92
93
|
- !ruby/object:Gem::Version
|
93
94
|
version: '0'
|
94
95
|
requirements: []
|
95
96
|
rubyforge_project:
|
96
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.7.6
|
97
98
|
signing_key:
|
98
99
|
specification_version: 4
|
99
100
|
summary: JRuby interface into JMS
|
100
101
|
test_files:
|
101
|
-
- test/connection_test.rb
|
102
|
-
- test/jms.yml
|
103
|
-
- test/log4j.properties
|
104
|
-
- test/message_test.rb
|
105
|
-
- test/session_pool_test.rb
|
106
102
|
- test/session_test.rb
|
103
|
+
- test/session_pool_test.rb
|
104
|
+
- test/message_test.rb
|
105
|
+
- test/connection_test.rb
|
107
106
|
- test/test_helper.rb
|
107
|
+
- test/log4j.properties
|
108
|
+
- test/jms.yml
|