Beispiel #1
0
 /**
  * Send messages to Kafka
  * 
  * @param array   $messages  Messages to send
  * @param string  $topic     Topic
  * @param integer $partition Partition
  *
  * @return boolean
  */
 public function send(array $messages, $topic, $partition = 0xffffffff)
 {
     $this->connect();
     return $this->socket->write(Encoder::encode_produce_request($topic, $partition, $messages, $this->compression));
 }