Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3026f0a

Browse files
committed
update function names
1 parent 5e4db55 commit 3026f0a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/ext-php-kafka/pure-php/metadata.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
// $conf->set('debug', 'all');
3535

3636
$producer = new Producer($conf);
37+
3738
// get metadata
3839
$metadata = $producer->getMetadata(false, 10000);
3940
echo sprintf('Broker id: %d', $metadata->getOrigBrokerId()) . PHP_EOL;
@@ -51,12 +52,12 @@
5152
echo 'Info about topics' . PHP_EOL;
5253
$topics = $metadata->getTopics();
5354
while ($topics->valid()) {
54-
echo sprintf('Topic name: %s', $topics->current()->getTopic()) . PHP_EOL;
55-
echo sprintf('Topic error: %d', $topics->current()->getErr()) . PHP_EOL;
55+
echo sprintf('Topic name: %s', $topics->current()->getName()) . PHP_EOL;
56+
echo sprintf('Topic error: %d', $topics->current()->getErrorCode()) . PHP_EOL;
5657
$partitions = $topics->current()->getPartitions();
5758
while ($partitions->valid()) {
5859
echo sprintf(' Topic partition id: %d', $partitions->current()->getId()) . PHP_EOL;
59-
echo sprintf(' Topic partition err: %d', $partitions->current()->getErr()) . PHP_EOL;
60+
echo sprintf(' Topic partition err: %d', $partitions->current()->getErrorCode()) . PHP_EOL;
6061
echo sprintf(' Topic partition leader id: %d', $partitions->current()->getLeader()) . PHP_EOL;
6162
$replicas = $partitions->current()->getReplicas();
6263
while ($replicas->valid()) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /