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

key() public method

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

Usage Example

コード例 #1
0
ファイル: Consumer.php プロジェクト: mathroc/kafka-php
 /**
  * @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