Class: Aws::Broker::Naming

Inherits:
Object
  • Object
show all
Defined in:
lib/aws/broker/naming.rb

Instance Method Summary collapse

Instance Method Details

#queue(topic) ⇒ Object



5
6
7
8
9
10
11
# 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) ⇒ Object

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.



18
19
20
21
22
23
24
# File 'lib/aws/broker/naming.rb', line 18

def topic(topic)
  if config.topic_prefix
    "#{config.topic_prefix}_#{topic}"
  else
    topic
  end
end