コード例 #1
0
ファイル: Message.php プロジェクト: gavinjx/kafka
 /**
  * Get the message payload
  * 
  * @return string|Kafka_MessageSetInternalIterator
  */
 public function payload()
 {
     return Kafka_Encoder::decompress($this->payload, $this->compression);
 }
コード例 #2
0
ファイル: EncoderTest.php プロジェクト: yangnenggit/kafka-php
 /**
  * @expectedException Kafka_Exception_NotSupported
  */
 public function testDecompressUnknown()
 {
     $msg = 'test message';
     Kafka_Encoder::decompress($msg, 15);
     $this->fail('The above call should fail');
 }