Parent

Class/Module Index [+]

Quicksearch

AMQ::Client::ConsumerTagGenerator

Public Instance Methods

generate() click to toggle source

@return [String] Generated consumer tag

# File lib/amq/client/consumer_tag_generator.rb, line 11
def generate
  "#{Kernel.rand}-#{Time.now.to_i * 1000}-#{Kernel.rand(999_999_999_999)}"
end
generate_for(queue) click to toggle source

@return [String] Generated consumer tag

# File lib/amq/client/consumer_tag_generator.rb, line 16
def generate_for(queue)
  raise ArgumentError, "argument must respond to :name" unless queue.respond_to?(:name)

  "#{queue.name}-#{Time.now.to_i * 1000}-#{Kernel.rand(999_999_999_999)}"
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.