Class: Messagebus::Swarm::Drone::LoggingWorker

Inherits:
Object
  • Object
show all
Defined in:
lib/messagebus/swarm/drone/logging_worker.rb

Overview

Use this for easy testing that a messagebus message is received. Example config:

-
 :destination: jms.topic.some_destination_you_want_to_debug
 :subscription_id: <some_subscription_id>
 :worker: Messagebus::Swarm::Drone::LoggingWorker
 :drones: 1

Class Method Summary collapse

Class Method Details

.perform_on_destination(message, destination) ⇒ Object



45
46
47
48
49
# File 'lib/messagebus/swarm/drone/logging_worker.rb', line 45

def self.perform_on_destination(message, destination)
  log_message = %|received a message. destination=#{destination}, message=#{message.inspect}|
  Rails.logger.info(log_message) if defined?(Rails.logger)
  puts log_message
end