Sha256: 0d13869d8b6d7e9975fa1daf26db4b7aa3b312c14161a6ba3e3743e47468acfe
Contents?: true
Size: 618 Bytes
Versions: 32
Compression:
Stored size: 618 Bytes
Contents
# encoding: utf-8 module AMQ module Client 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 # Client end # AMQ
Version data entries
32 entries across 32 versions & 1 rubygems