class Bunny::ConsumerTagGenerator
Used to generate consumer tags in the client
Public Instance Methods
Source
# File lib/bunny/consumer_tag_generator.rb, line 12 def generate t = Bunny::Timestamp.now "#{Kernel.rand}-#{t.to_i * 1000}-#{Kernel.rand(999_999_999_999)}" end
@return [String] Generated consumer tag
Source
# File lib/bunny/consumer_tag_generator.rb, line 22 def generate_prefixed(name = "bunny") t = Bunny::Timestamp.now "#{name}-#{t.to_i * 1000}-#{Kernel.rand(999_999_999_999)}" end
Unique string supposed to be used as a consumer tag.
@return [String] Unique string. @api public