gz_activemessaging 0.13.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.travis.yml +40 -0
- data/Appraisals +19 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +87 -0
- data/README.md +27 -0
- data/Rakefile +49 -0
- data/VERSION +1 -0
- data/activemessaging.gemspec +137 -0
- data/gemfiles/activesupport23.gemfile +10 -0
- data/gemfiles/activesupport23.gemfile.lock +51 -0
- data/gemfiles/activesupport30.gemfile +11 -0
- data/gemfiles/activesupport30.gemfile.lock +53 -0
- data/gemfiles/activesupport31.gemfile +11 -0
- data/gemfiles/activesupport31.gemfile.lock +55 -0
- data/gemfiles/activesupport32.gemfile +10 -0
- data/gemfiles/activesupport32.gemfile.lock +55 -0
- data/generators/a13g_test_harness/a13g_test_harness_generator.rb +19 -0
- data/generators/a13g_test_harness/templates/active_messaging_test.rhtml +13 -0
- data/generators/a13g_test_harness/templates/active_messaging_test_controller.rb +29 -0
- data/generators/a13g_test_harness/templates/index.rhtml +17 -0
- data/generators/filter/USAGE +0 -0
- data/generators/filter/filter_generator.rb +19 -0
- data/generators/filter/templates/filter.rb +12 -0
- data/generators/filter/templates/filter_test.rb +28 -0
- data/generators/processor/USAGE +8 -0
- data/generators/processor/processor_generator.rb +31 -0
- data/generators/processor/templates/application_processor.rb +18 -0
- data/generators/processor/templates/broker.yml +140 -0
- data/generators/processor/templates/jruby_poller +117 -0
- data/generators/processor/templates/messaging.rb +12 -0
- data/generators/processor/templates/poller +25 -0
- data/generators/processor/templates/poller.rb +26 -0
- data/generators/processor/templates/processor.rb +8 -0
- data/generators/processor/templates/processor_test.rb +20 -0
- data/generators/tracer/USAGE +8 -0
- data/generators/tracer/templates/controller.rb +14 -0
- data/generators/tracer/templates/helper.rb +2 -0
- data/generators/tracer/templates/index.rhtml +4 -0
- data/generators/tracer/templates/layout.rhtml +16 -0
- data/generators/tracer/templates/trace_processor.rb +100 -0
- data/generators/tracer/tracer_generator.rb +25 -0
- data/init.rb +1 -0
- data/lib/activemessaging.rb +133 -0
- data/lib/activemessaging/adapter.rb +20 -0
- data/lib/activemessaging/adapters/amqp.rb +215 -0
- data/lib/activemessaging/adapters/asqs.rb +487 -0
- data/lib/activemessaging/adapters/base.rb +71 -0
- data/lib/activemessaging/adapters/beanstalk.rb +88 -0
- data/lib/activemessaging/adapters/jms.rb +243 -0
- data/lib/activemessaging/adapters/reliable_msg.rb +186 -0
- data/lib/activemessaging/adapters/stomp.rb +212 -0
- data/lib/activemessaging/adapters/synch.rb +95 -0
- data/lib/activemessaging/adapters/test.rb +137 -0
- data/lib/activemessaging/adapters/wmq.rb +193 -0
- data/lib/activemessaging/base_message.rb +28 -0
- data/lib/activemessaging/filter.rb +29 -0
- data/lib/activemessaging/gateway.rb +429 -0
- data/lib/activemessaging/message_sender.rb +30 -0
- data/lib/activemessaging/named_base.rb +54 -0
- data/lib/activemessaging/processor.rb +44 -0
- data/lib/activemessaging/railtie.rb +26 -0
- data/lib/activemessaging/test_helper.rb +189 -0
- data/lib/activemessaging/threaded_poller.rb +234 -0
- data/lib/activemessaging/trace_filter.rb +34 -0
- data/lib/generators/active_messaging/install/USAGE +21 -0
- data/lib/generators/active_messaging/install/install_generator.rb +39 -0
- data/lib/generators/active_messaging/install/templates/application_processor.rb +18 -0
- data/lib/generators/active_messaging/install/templates/broker.yml +139 -0
- data/lib/generators/active_messaging/install/templates/poller +24 -0
- data/lib/generators/active_messaging/install/templates/poller.rb +22 -0
- data/lib/generators/active_messaging/install/templates/threaded_poller +46 -0
- data/lib/generators/active_messaging/processor/USAGE +2 -0
- data/lib/generators/active_messaging/processor/processor_generator.rb +39 -0
- data/lib/generators/active_messaging/processor/templates/messaging.rb +12 -0
- data/lib/generators/active_messaging/processor/templates/processor.rb +8 -0
- data/lib/generators/active_messaging/processor/templates/processor_spec.rb +24 -0
- data/lib/generators/active_messaging/processor/templates/processor_test.rb +20 -0
- data/lib/tasks/start_consumers.rake +8 -0
- data/poller.rb +14 -0
- data/test/all_tests.rb +10 -0
- data/test/app/config/broker.yml +4 -0
- data/test/asqs_test.rb +125 -0
- data/test/config_test.rb +42 -0
- data/test/filter_test.rb +131 -0
- data/test/gateway_test.rb +220 -0
- data/test/jms_test.rb +64 -0
- data/test/reliable_msg_test.rb +83 -0
- data/test/stomp_test.rb +168 -0
- data/test/test_helper.rb +36 -0
- data/test/tracer_test.rb +57 -0
- metadata +202 -0
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "http://rubygems.org"
|
4
|
+
|
5
|
+
gem "celluloid", "~>0.12", :group=>:test, :platform=>:ruby
|
6
|
+
gem "jruby-activemq", :group=>:test, :platform=>:jruby
|
7
|
+
gem "appraisal", :group=>:test
|
8
|
+
gem "activesupport", "~> 3.0.8"
|
9
|
+
gem "i18n"
|
10
|
+
|
11
|
+
gemspec :development_group=>:test, :path=>"../"
|
@@ -0,0 +1,53 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
activemessaging (0.12.1)
|
5
|
+
activemessaging
|
6
|
+
activesupport (>= 2.3.11)
|
7
|
+
celluloid
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (3.0.16)
|
13
|
+
appraisal (0.4.1)
|
14
|
+
bundler
|
15
|
+
rake
|
16
|
+
celluloid (0.11.1)
|
17
|
+
timers (>= 1.0.0)
|
18
|
+
git (1.2.5)
|
19
|
+
i18n (0.6.0)
|
20
|
+
jeweler (1.8.4)
|
21
|
+
bundler (~> 1.0)
|
22
|
+
git (>= 1.2.5)
|
23
|
+
rake
|
24
|
+
rdoc
|
25
|
+
jruby-activemq (5.5.1-java)
|
26
|
+
json (1.7.4)
|
27
|
+
json (1.7.4-java)
|
28
|
+
macaddr (1.6.1)
|
29
|
+
systemu (~> 2.5.0)
|
30
|
+
rake (0.9.2.2)
|
31
|
+
rdoc (3.12)
|
32
|
+
json (~> 1.4)
|
33
|
+
reliable-msg (1.1.0)
|
34
|
+
uuid (>= 1.0.0)
|
35
|
+
stomp (1.2.4)
|
36
|
+
systemu (2.5.2)
|
37
|
+
timers (1.0.1)
|
38
|
+
uuid (2.3.5)
|
39
|
+
macaddr (~> 1.0)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
java
|
43
|
+
ruby
|
44
|
+
|
45
|
+
DEPENDENCIES
|
46
|
+
activemessaging!
|
47
|
+
activesupport (~> 3.0.8)
|
48
|
+
appraisal
|
49
|
+
i18n
|
50
|
+
jeweler
|
51
|
+
jruby-activemq
|
52
|
+
reliable-msg (~> 1.1)
|
53
|
+
stomp
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "http://rubygems.org"
|
4
|
+
|
5
|
+
gem "celluloid", "~>0.12", :group=>:test, :platform=>:ruby
|
6
|
+
gem "jruby-activemq", :group=>:test, :platform=>:jruby
|
7
|
+
gem "appraisal", :group=>:test
|
8
|
+
gem "activesupport", "~> 3.1.2"
|
9
|
+
gem "i18n"
|
10
|
+
|
11
|
+
gemspec :development_group=>:test, :path=>"../"
|
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
activemessaging (0.12.1)
|
5
|
+
activemessaging
|
6
|
+
activesupport (>= 2.3.11)
|
7
|
+
celluloid
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (3.1.7)
|
13
|
+
multi_json (>= 1.0, < 1.3)
|
14
|
+
appraisal (0.4.1)
|
15
|
+
bundler
|
16
|
+
rake
|
17
|
+
celluloid (0.11.1)
|
18
|
+
timers (>= 1.0.0)
|
19
|
+
git (1.2.5)
|
20
|
+
i18n (0.6.0)
|
21
|
+
jeweler (1.8.4)
|
22
|
+
bundler (~> 1.0)
|
23
|
+
git (>= 1.2.5)
|
24
|
+
rake
|
25
|
+
rdoc
|
26
|
+
jruby-activemq (5.5.1-java)
|
27
|
+
json (1.7.4)
|
28
|
+
json (1.7.4-java)
|
29
|
+
macaddr (1.6.1)
|
30
|
+
systemu (~> 2.5.0)
|
31
|
+
multi_json (1.2.0)
|
32
|
+
rake (0.9.2.2)
|
33
|
+
rdoc (3.12)
|
34
|
+
json (~> 1.4)
|
35
|
+
reliable-msg (1.1.0)
|
36
|
+
uuid (>= 1.0.0)
|
37
|
+
stomp (1.2.4)
|
38
|
+
systemu (2.5.2)
|
39
|
+
timers (1.0.1)
|
40
|
+
uuid (2.3.5)
|
41
|
+
macaddr (~> 1.0)
|
42
|
+
|
43
|
+
PLATFORMS
|
44
|
+
java
|
45
|
+
ruby
|
46
|
+
|
47
|
+
DEPENDENCIES
|
48
|
+
activemessaging!
|
49
|
+
activesupport (~> 3.1.2)
|
50
|
+
appraisal
|
51
|
+
i18n
|
52
|
+
jeweler
|
53
|
+
jruby-activemq
|
54
|
+
reliable-msg (~> 1.1)
|
55
|
+
stomp
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# This file was generated by Appraisal
|
2
|
+
|
3
|
+
source "http://rubygems.org"
|
4
|
+
|
5
|
+
gem "celluloid", "~>0.12", :group=>:test, :platform=>:ruby
|
6
|
+
gem "jruby-activemq", :group=>:test, :platform=>:jruby
|
7
|
+
gem "appraisal", :group=>:test
|
8
|
+
gem "activesupport", "~> 3.2.2"
|
9
|
+
|
10
|
+
gemspec :development_group=>:test, :path=>"../"
|
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ..
|
3
|
+
specs:
|
4
|
+
activemessaging (0.12.1)
|
5
|
+
activemessaging
|
6
|
+
activesupport (>= 2.3.11)
|
7
|
+
celluloid
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activesupport (3.2.7)
|
13
|
+
i18n (~> 0.6)
|
14
|
+
multi_json (~> 1.0)
|
15
|
+
appraisal (0.4.1)
|
16
|
+
bundler
|
17
|
+
rake
|
18
|
+
celluloid (0.11.1)
|
19
|
+
timers (>= 1.0.0)
|
20
|
+
git (1.2.5)
|
21
|
+
i18n (0.6.0)
|
22
|
+
jeweler (1.8.4)
|
23
|
+
bundler (~> 1.0)
|
24
|
+
git (>= 1.2.5)
|
25
|
+
rake
|
26
|
+
rdoc
|
27
|
+
jruby-activemq (5.5.1-java)
|
28
|
+
json (1.7.4)
|
29
|
+
json (1.7.4-java)
|
30
|
+
macaddr (1.6.1)
|
31
|
+
systemu (~> 2.5.0)
|
32
|
+
multi_json (1.3.6)
|
33
|
+
rake (0.9.2.2)
|
34
|
+
rdoc (3.12)
|
35
|
+
json (~> 1.4)
|
36
|
+
reliable-msg (1.1.0)
|
37
|
+
uuid (>= 1.0.0)
|
38
|
+
stomp (1.2.4)
|
39
|
+
systemu (2.5.2)
|
40
|
+
timers (1.0.1)
|
41
|
+
uuid (2.3.5)
|
42
|
+
macaddr (~> 1.0)
|
43
|
+
|
44
|
+
PLATFORMS
|
45
|
+
java
|
46
|
+
ruby
|
47
|
+
|
48
|
+
DEPENDENCIES
|
49
|
+
activemessaging!
|
50
|
+
activesupport (~> 3.2.2)
|
51
|
+
appraisal
|
52
|
+
jeweler
|
53
|
+
jruby-activemq
|
54
|
+
reliable-msg (~> 1.1)
|
55
|
+
stomp
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class A13gTestHarnessGenerator < RubiGen::Base
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
|
5
|
+
controller_path = 'app/controllers'
|
6
|
+
m.directory controller_path
|
7
|
+
m.file 'active_messaging_test_controller.rb', File.join(controller_path, 'active_messaging_test_controller.rb')
|
8
|
+
|
9
|
+
view_path = 'app/views/active_messaging_test'
|
10
|
+
m.directory view_path
|
11
|
+
m.file 'index.rhtml', File.join(view_path, 'index.rhtml')
|
12
|
+
|
13
|
+
view_path = 'app/views/layouts'
|
14
|
+
m.directory view_path
|
15
|
+
m.file 'active_messaging_test.rhtml', File.join(view_path, 'active_messaging_test.rhtml')
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
class ActiveMessagingTestController < ApplicationController
|
2
|
+
|
3
|
+
include ActiveMessaging::MessageSender
|
4
|
+
|
5
|
+
def index
|
6
|
+
@destinations = ActiveMessaging::Gateway.named_destinations.values
|
7
|
+
|
8
|
+
if request.post?
|
9
|
+
@message = params[:message]
|
10
|
+
|
11
|
+
if params[:destination].nil? || params[:destination].empty?
|
12
|
+
flash[:notice] = "Please specify a destination."
|
13
|
+
return
|
14
|
+
else
|
15
|
+
@destination = params[:destination].intern
|
16
|
+
end
|
17
|
+
|
18
|
+
if @message.nil? || @message.empty?
|
19
|
+
flash[:notice] = "Please specify a message."
|
20
|
+
return
|
21
|
+
end
|
22
|
+
|
23
|
+
puts "#{@destination} : #{@message}"
|
24
|
+
publish @destination, @message
|
25
|
+
flash[:notice] = "'#{@message}' sent to #{@destination}"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h1>ActiveMessaging Test Harness</h1>
|
2
|
+
|
3
|
+
<% form_tag :action => 'index' do |f| %>
|
4
|
+
<p>
|
5
|
+
<label for="destination">Destination:</label><br/>
|
6
|
+
(broker: name => 'destination')<br/>
|
7
|
+
<select name="destination">
|
8
|
+
<option value=""></option>
|
9
|
+
<%= options_from_collection_for_select @destinations, 'name', 'to_s', @destination %>
|
10
|
+
</select>
|
11
|
+
</p>
|
12
|
+
<p>
|
13
|
+
<label for="message">Message:</label><br/>
|
14
|
+
<%= text_area_tag :message, @message, :size=>'50x10' %>
|
15
|
+
</p>
|
16
|
+
<%= submit_tag "submit" %>
|
17
|
+
<% end -%>
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
class FilterGenerator < RubiGen::Base
|
2
|
+
def manifest
|
3
|
+
record do |m|
|
4
|
+
path = 'app/processors'
|
5
|
+
test_path = 'test/functional'
|
6
|
+
|
7
|
+
# Check for class naming collisions
|
8
|
+
m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
|
9
|
+
|
10
|
+
# filter and test directories
|
11
|
+
m.directory File.join(path, class_path)
|
12
|
+
m.directory File.join(test_path, class_path)
|
13
|
+
|
14
|
+
# filter and test templates
|
15
|
+
m.template 'filter.rb', File.join(path, class_path, "#{file_name}_filter.rb")
|
16
|
+
m.template 'filter_test.rb', File.join(test_path, class_path, "#{file_name}_filter_test.rb")
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class <%= class_name %>Filter < ActiveMessaging::Filter
|
2
|
+
|
3
|
+
attr_accessor :options
|
4
|
+
|
5
|
+
def initialize(options={})
|
6
|
+
@options = options
|
7
|
+
end
|
8
|
+
|
9
|
+
def process(message, routing)
|
10
|
+
logger.debug "<%= class_name %>Filter filtering message: #{message.inspect} with routing: #{routing.inspect}"
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../test_helper'
|
2
|
+
require File.dirname(__FILE__) + '/../../vendor/plugins/activemessaging/lib/activemessaging/test_helper'
|
3
|
+
|
4
|
+
class <%= class_name %>FilterTest < Test::Unit::TestCase
|
5
|
+
include ActiveMessaging::TestHelper
|
6
|
+
|
7
|
+
def setup
|
8
|
+
# if you want to write code to tests against the filter directly
|
9
|
+
load File.dirname(__FILE__) + "/../../app/processors/<%= file_name %>_filter.rb"
|
10
|
+
@options = {:direction=>:incoming, :only=>:<%= file_name %>_test}
|
11
|
+
@filter = <%= class_name %>Filter.new(@options)
|
12
|
+
@destination = ActiveMessaging::Gateway.destination :<%= file_name %>_test, '/queue/<%= file_name %>.test.queue'
|
13
|
+
end
|
14
|
+
|
15
|
+
def teardown
|
16
|
+
ActiveMessaging::Gateway.reset
|
17
|
+
@filter = nil
|
18
|
+
@destination = nil
|
19
|
+
@options = nil
|
20
|
+
end
|
21
|
+
|
22
|
+
def test_<%= file_name %>_filter
|
23
|
+
@message = ActiveMessaging::TestMessage.new('message body', {'message-id'=>'test-message-id-header'}, @destination.value )
|
24
|
+
@routing = {:direction=>:incoming, :destination=>@destination}
|
25
|
+
@filter.process(@message, @routing)
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../lib/activemessaging/named_base'
|
2
|
+
|
3
|
+
class ProcessorGenerator < NamedBase
|
4
|
+
def manifest
|
5
|
+
record do |m|
|
6
|
+
path = 'app/processors'
|
7
|
+
test_path = 'test/functional'
|
8
|
+
|
9
|
+
# Check for class naming collisions.
|
10
|
+
m.class_collisions class_path, "#{class_name}Controller", "#{class_name}ControllerTest", "#{class_name}Helper"
|
11
|
+
|
12
|
+
# processor and test directories
|
13
|
+
m.directory File.join(path, class_path)
|
14
|
+
m.directory File.join(test_path, class_path)
|
15
|
+
|
16
|
+
# processor and test templates
|
17
|
+
m.template 'processor.rb', File.join(path, class_path, "#{file_name}_processor.rb")
|
18
|
+
m.template 'processor_test.rb', File.join(test_path, class_path, "#{file_name}_processor_test.rb")
|
19
|
+
|
20
|
+
m.template 'messaging.rb', File.join('config', "messaging.rb")
|
21
|
+
m.file 'broker.yml', File.join('config', "broker.yml")
|
22
|
+
m.file 'application_processor.rb', File.join(path, "application_processor.rb")
|
23
|
+
m.file 'poller.rb', File.join('lib', "poller.rb")
|
24
|
+
if defined?(JRUBY_VERSION)
|
25
|
+
m.file 'jruby_poller', File.join('script', "jruby_poller"), { :chmod => 0755 }
|
26
|
+
else
|
27
|
+
m.file 'poller', File.join('script', "poller"), { :chmod => 0755 }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class ApplicationProcessor < ActiveMessaging::Processor
|
2
|
+
|
3
|
+
# Default on_error implementation - logs standard errors but keeps processing. Other exceptions are raised.
|
4
|
+
# Have on_error throw ActiveMessaging::AbortMessageException when you want a message to be aborted/rolled back,
|
5
|
+
# meaning that it can and should be retried (idempotency matters here).
|
6
|
+
# Retry logic varies by broker - see individual adapter code and docs for how it will be treated
|
7
|
+
def on_error(err)
|
8
|
+
if (err.kind_of?(StandardError))
|
9
|
+
logger.error "ApplicationProcessor::on_error: #{err.class.name} rescued:\n" + \
|
10
|
+
err.message + "\n" + \
|
11
|
+
"\t" + err.backtrace.join("\n\t")
|
12
|
+
else
|
13
|
+
logger.error "ApplicationProcessor::on_error: #{err.class.name} raised: " + err.message
|
14
|
+
raise err
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
@@ -0,0 +1,140 @@
|
|
1
|
+
#
|
2
|
+
# broker.yml
|
3
|
+
#
|
4
|
+
# Simple yaml file for the env specific configuration of the broker connections.
|
5
|
+
# See the wiki for more information: http://code.google.com/p/activemessaging/wiki/Configuration
|
6
|
+
#
|
7
|
+
development:
|
8
|
+
############################
|
9
|
+
# Stomp Adapter Properties #
|
10
|
+
############################
|
11
|
+
adapter: stomp
|
12
|
+
|
13
|
+
# properties below are all defaults for this adapter
|
14
|
+
# login: ""
|
15
|
+
# passcode: ""
|
16
|
+
# host: localhost
|
17
|
+
# port: 61613
|
18
|
+
# reliable: true
|
19
|
+
# reconnectDelay: 5
|
20
|
+
|
21
|
+
# NEW! enable stomp retry logic
|
22
|
+
# will resend errored out messages to be retried when on_error throws ActiveMessaging::AbortMessageException
|
23
|
+
#
|
24
|
+
# Max number of times to retry an aborted message, for 0, will not retry (default)
|
25
|
+
# retryMax: 0
|
26
|
+
#
|
27
|
+
# If error still occurs after retryMax, send message to specified dead letter queue
|
28
|
+
# deadLetterQueue: '/queue/activemessaging/deadletter'
|
29
|
+
|
30
|
+
|
31
|
+
###########################
|
32
|
+
# AMQP Adapter Properties #
|
33
|
+
###########################
|
34
|
+
# adapter: amqp
|
35
|
+
|
36
|
+
# properties below are defaults for this adapter
|
37
|
+
# host: localhost
|
38
|
+
# port: 5672
|
39
|
+
# user: guest
|
40
|
+
# pass: guest
|
41
|
+
# vhost: /
|
42
|
+
# ssl: false
|
43
|
+
# ssl_verify: 1
|
44
|
+
# debug: 0
|
45
|
+
# queue_name: <autogenerated>
|
46
|
+
# queue_durable: false if queue_name is autogenerated, defaults to true otherwise
|
47
|
+
# queue_auto_delete: true if queue_name is autogenerated, defaults to false otherwise
|
48
|
+
# queue_exclusive: true if queue_name is autogenerated, defaults to true otherwise
|
49
|
+
|
50
|
+
# SSL:
|
51
|
+
|
52
|
+
# in order to use SSL you will need to use the following fork of the carrot project:
|
53
|
+
#
|
54
|
+
# http://github.com/rabbitt/carrot
|
55
|
+
#
|
56
|
+
# If your certificate is self signed, you will want to set ssl_verify to 0 which corresponds to
|
57
|
+
# OpenSSL::SSL::VERIFY_NONE. Otherwise, it defaults to 1 (OpenSSL::SSL::VERIFY_PEER).
|
58
|
+
|
59
|
+
# QUEUE_*:
|
60
|
+
|
61
|
+
# queue_name is the name of the "inbox" queue that will be bound to all subscription keys (called queues
|
62
|
+
# or destinations here). In other words, you only have one queue where all messages end up using this
|
63
|
+
# adapter, and it is bound to the relevant exchanges using routing keys and exchange information
|
64
|
+
# you provide in your messages.rb and subscribes_to calls. For example,
|
65
|
+
#
|
66
|
+
# in messages.rb:
|
67
|
+
# s.queue :hello_world, 'hello.world', :exchange_type => :direct, :exchange_name => 'amq.direct'
|
68
|
+
#
|
69
|
+
# in a processor:
|
70
|
+
# subscribes_to :hello_world, :routing_key => 'hello.#'
|
71
|
+
#
|
72
|
+
# in a model:
|
73
|
+
# publish :hello_world, 'Hello world!', :routing_key => 'hello.world'
|
74
|
+
|
75
|
+
|
76
|
+
# Note: in the event that you don't specify a routing_key on publish, the queue_name of the specified
|
77
|
+
# destination (as listed in messages.rb) will be used as the routing_key when publishing.
|
78
|
+
|
79
|
+
################################
|
80
|
+
# Beanstalk Adapter Properties #
|
81
|
+
################################
|
82
|
+
# adapter: beanstalk
|
83
|
+
# host: localhost
|
84
|
+
|
85
|
+
## properties below are all defaults for this adapter
|
86
|
+
# port: 11300
|
87
|
+
|
88
|
+
|
89
|
+
#################################
|
90
|
+
# Amazon SQS Adapter Properties #
|
91
|
+
#################################
|
92
|
+
# adapter: asqs
|
93
|
+
# access_key_id: XXXXXXXXXXXXXXXXXXXX
|
94
|
+
# secret_access_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
95
|
+
|
96
|
+
## properties below are all defaults for this adapter
|
97
|
+
# host: queue.amazonaws.com
|
98
|
+
# port: 80
|
99
|
+
# reliable: true
|
100
|
+
# reconnectDelay: 5
|
101
|
+
# aws_version: 2006-04-01
|
102
|
+
# content_type: text/plain
|
103
|
+
# poll_interval: 1
|
104
|
+
# cache_queue_list: true
|
105
|
+
# max_message_size: 8
|
106
|
+
|
107
|
+
|
108
|
+
########################################
|
109
|
+
# ReliableMessaging Adapter Properties #
|
110
|
+
########################################
|
111
|
+
# adapter: reliable_msg
|
112
|
+
|
113
|
+
## properties below are all defaults for this adapter
|
114
|
+
# poll_interval: 1
|
115
|
+
# reliable: true
|
116
|
+
|
117
|
+
|
118
|
+
###################################
|
119
|
+
# Websphere MQ Adapter Properties #
|
120
|
+
###################################
|
121
|
+
# adapter: wmq
|
122
|
+
# q_mgr_name: ""
|
123
|
+
# poll_interval: .1
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
test:
|
128
|
+
adapter: test
|
129
|
+
reliable: false
|
130
|
+
|
131
|
+
production:
|
132
|
+
adapter: stomp
|
133
|
+
reliable: true
|
134
|
+
# properties below are all defaults for this adapter
|
135
|
+
# login: ""
|
136
|
+
# passcode: ""
|
137
|
+
# host: localhost
|
138
|
+
# port: 61613
|
139
|
+
# reliable: true
|
140
|
+
# reconnectDelay: 5
|