lib/poseidon/consumer_group.rb
# Claim the ownership of the partition for this consumer
# @raise [Timeout::Error]
Claim the ownership of the partition for this consumer
Claim the ownership of the partition for this consumer
def claim!(partition)
      path = claim_path(partition)
      Timeout.timeout options[:claim_timout] || DEFAULT_CLAIM_TIMEOUT do
        while zk.create(path, id, ephemeral: true, ignore: :node_exists).nil?
          return if @pending
          sleep(0.1)
        end
      end
      Consumer.new self, partition, options.dup
    end
def claim! ( partition ) path = claim_path ( partition ) Timeout . timeout options [ :claim_timout ] || DEFAULT_CLAIM_TIMEOUT do while zk . create ( path , id , ephemeral : true , ignore : :node_exists ) . nil? return if @pending sleep ( 0.1 ) end end Consumer . new self , partition , options . dup end
Claim the ownership of the partition for this consumer
Claim the ownership of the partition for this consumer
None
partition
<not_specific>