Sha256: 26e94afceace69280b03c2670d94e5faa4ce77495504adfa5f1dc4fb579af004
Contents?: true
Size: 535 Bytes
Versions: 24
Compression:
Stored size: 535 Bytes
Contents
module AMQP class ConsumerTagGenerator # # API # # @return [String] Generated consumer tag def generate "#{Kernel.rand}-#{Time.now.to_i * 1000}-#{Kernel.rand(999_999_999_999)}" end # generate # @return [String] Generated consumer tag 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 # generate_for(queue) end # ConsumerTagGenerator end
Version data entries
24 entries across 24 versions & 1 rubygems