W/o Durability
app/processors/sample_processor.rb
class SampleProcessor < ActiveMessaging::Processor subscribes_to :sample_topic def on_message(message) puts message end end
config/messaging.rb
ActiveMessaging::Gateway.define do |s| s.destination :sample_topic, '/topic/SampleTopic' end
config/broker.yml
development: adapter: stomp
W/ Durability
app/processors/sample_processor.rb
class SampleProcessor < ActiveMessaging::Processor subscribes_to :sample_topic, { 'activemq.subscriptionName' => 'SampleSubscription' } def on_message(message) puts message end end
config/messaging.rb
ActiveMessaging::Gateway.define do |s| s.destination :sample_topic, '/topic/SampleTopic' end
config/broker.yml
development: adapter: stomp clientId: SampleClient