|
34 | 34 | // $conf->set('debug', 'all');
|
35 | 35 |
|
36 | 36 | $producer = new Producer($conf);
|
| 37 | + |
37 | 38 | // get metadata
|
38 | 39 | $metadata = $producer->getMetadata(false, 10000);
|
39 | 40 | echo sprintf('Broker id: %d', $metadata->getOrigBrokerId()) . PHP_EOL;
|
|
51 | 52 | echo 'Info about topics' . PHP_EOL;
|
52 | 53 | $topics = $metadata->getTopics();
|
53 | 54 | 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; |
56 | 57 | $partitions = $topics->current()->getPartitions();
|
57 | 58 | while ($partitions->valid()) {
|
58 | 59 | 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; |
60 | 61 | echo sprintf(' Topic partition leader id: %d', $partitions->current()->getLeader()) . PHP_EOL;
|
61 | 62 | $replicas = $partitions->current()->getReplicas();
|
62 | 63 | while ($replicas->valid()) {
|
|
0 commit comments