class Jackhammer::QueueName
Public Class Methods
app_name()
click to toggle source
# File lib/jackhammer/queue_name.rb, line 3 def self.app_name Jackhammer.configuration.app_name end
from_routing_key(routing_key)
click to toggle source
# File lib/jackhammer/queue_name.rb, line 7 def self.from_routing_key(routing_key) fail(InvalidConfigError, "app_name must be set to determine queue_name from routing_key") if app_name.to_s.empty? "#{app_name}_#{routing_key}_q".gsub(/[^\w]+/, '_').squeeze('_') end