Skip to content
This repository has been archived by the owner on Jun 10, 2022. It is now read-only.

Commit

Permalink
fix error log
Browse files Browse the repository at this point in the history
  • Loading branch information
nmred committed Apr 28, 2017
1 parent 13c1941 commit 0e7d3b1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Kafka-php
[![GitHub stars](https://img.shields.io/github/stars/weiboad/kafka-php.svg?style=plastic)](https://github.com/weiboad/kafka-php/stargazers)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg?style=plastic)](https://raw.githubusercontent.com/weiboad/kafka-php/master/LICENSE)

Kafka-php is a pure PHP kafka client that currently supports more than 0.8.x version of Kafka, this project v0.2.x and v0.1.x are incompatible if using the original v0.1.x You can refer to the document [Kafka PHP v0.1.x Document] (https://github.com/weiboad/kafka-php/blob/v0.1.6/README.md), but it is recommended to switch to v0.2.x . v0.2.x use PHP asynchronous implementation and kafka broker interaction, more stable than v0.1.x efficient, because the use of PHP language so do not compile any expansion can be used to reduce the access and maintenance costs
Kafka-php is a pure PHP kafka client that currently supports more than 0.8.x version of Kafka, this project v0.2.x and v0.1.x are incompatible if using the original v0.1.x You can refer to the document
[Kafka PHP v0.1.x Document](https://github.com/weiboad/kafka-php/blob/v0.1.6/README.md), but it is recommended to switch to v0.2.x . v0.2.x use PHP asynchronous implementation and kafka broker interaction, more stable than v0.1.x efficient, because the use of PHP language so do not compile any expansion can be used to reduce the access and maintenance costs

## Requirements

Expand Down Expand Up @@ -49,7 +50,6 @@ $logger = new Logger('my_logger');
// Now add some handlers
$logger->pushHandler(new StdoutHandler());

// 设置生产相关配置,具体配置参数见 [Configuration](Configuration.md)
$config = \Kafka\ProducerConfig::getInstance();
$config->setMetadataRefreshIntervalMs(10000);
$config->setMetadataBrokerList('10.13.4.159:9192');
Expand Down
4 changes: 1 addition & 3 deletions src/Kafka/Consumer/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ protected function processRequest($data, $fd)
$this->succCommit($result);
break;
default:
var_dump($correlationId);
$this->error('Error request, correlationId:' . $correlationId);
}
}

Expand Down Expand Up @@ -734,8 +734,6 @@ protected function stateConvert($errorCode, $context = null)
if (\Kafka\Protocol::OFFSET_OUT_OF_RANGE == $errorCode) {
$assign = \Kafka\Consumer\Assignment::getInstance();
$offsets = $assign->getOffsets();
var_dump($offsets);
var_dump($context);
list($topic, $partId) = $context;
if (isset($offsets[$topic][$partId])) {
$assign->setConsumerOffset($topic, $partId, $offsets[$topic][$partId]);
Expand Down
2 changes: 1 addition & 1 deletion src/Kafka/Producer/Process.php
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ protected function processRequest($data, $fd)
$this->succProduce($result, $fd);
break;
default:
var_dump($correlationId);
$this->error('Error request, correlationId:' . $correlationId);
}
}

Expand Down

0 comments on commit 0e7d3b1

Please sign in to comment.