modern_times 0.2.9 → 0.2.10
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.
- data/VERSION +1 -1
- data/examples/consumer/consumer.rb +3 -3
- data/lib/modern_times/jms/consumer.rb +0 -1
- data/lib/modern_times/jms/publisher.rb +0 -1
- metadata +1 -1
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.10
|
@@ -15,10 +15,10 @@ end
|
|
15
15
|
|
16
16
|
config = YAML.load(ERB.new(File.read(File.join(File.dirname(__FILE__), '..', 'jms.yml'))).result(binding))
|
17
17
|
ModernTimes::JMS::Connection.init(config)
|
18
|
-
publisher = ModernTimes::JMS::Publisher.new(:queue_name => 'Foo', :marshal => :string
|
18
|
+
publisher = ModernTimes::JMS::Publisher.new(:queue_name => 'Foo', :marshal => :string)
|
19
19
|
consumer = ModernTimes::JMS::Consumer.new(:queue_name => 'Foo', :marshal => :string)
|
20
20
|
|
21
21
|
publisher.publish(ARGV[0], :jms_correlation_id => ARGV[1])
|
22
|
-
|
22
|
+
msg = consumer.receive(:jms_correlation_id => ARGV[1], :timeout => 30000)
|
23
23
|
#msg = consumer.receive(:timeout => 1000)
|
24
|
-
|
24
|
+
puts "msg=#{msg}"
|
@@ -37,7 +37,6 @@ module ModernTimes
|
|
37
37
|
options[:selector] = "JMSCorrelationID = '#{correlation_id}'" if correlation_id && !options[:selector]
|
38
38
|
timeout = options.delete(:timeout) || 0
|
39
39
|
obj = nil
|
40
|
-
ModernTimes.logger.debug {"Perform receive for #{options.inspect} timeout=#{timeout}"}
|
41
40
|
|
42
41
|
Connection.session_pool.consumer(options) do |session, consumer|
|
43
42
|
message = consumer.get(:timeout => timeout)
|
@@ -37,7 +37,6 @@ module ModernTimes
|
|
37
37
|
|
38
38
|
# Publish the given object to the address.
|
39
39
|
def publish(object, props={})
|
40
|
-
ModernTimes.logger.debug {"#{self}: Publishing #{object} with #{props.inspect}"}
|
41
40
|
message = nil
|
42
41
|
Connection.session_pool.producer(@real_producer_options) do |session, producer|
|
43
42
|
producer.time_to_live = @time_to_live if @time_to_live
|