class Aws::Broker::Naming

Public Instance Methods

queue(topic) click to toggle source
# File lib/aws/broker/naming.rb, line 5
def queue(topic)
  if config.queue_prefix
    "#{config.queue_prefix}-#{topic(topic)}"
  else
    topic(topic)
  end
end
topic(topic) click to toggle source

docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/SNS/Resource.html

Constraints: Topic names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, and hyphens, and must be between 1 and 256 characters long.

# File lib/aws/broker/naming.rb, line 18
def topic(topic)
  if config.topic_prefix
    "#{config.topic_prefix}_#{topic}"
  else
    topic
  end
end

Private Instance Methods

config() click to toggle source
# File lib/aws/broker/naming.rb, line 28
def config
  Broker.config
end