Kafka\Protocol\Fetch\Partition::key PHP Method

key() public method

key
public key ( ) : string
return string
    public function key()
    {
        return $this->key;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param \Kafka\Protocol\Fetch\Partition $partition
  */
 public function onPartitionEof($partition)
 {
     $partitionId = $partition->key();
     $topicName = $partition->getTopicName();
     $offset = $partition->getMessageOffset();
     $this->consumer->setFromOffset(true);
     $this->consumer->setPartition($topicName, $partitionId, $offset + 1);
 }
All Usage Examples Of Kafka\Protocol\Fetch\Partition::key