Skip to content

How to catch "Local: Maximum application poll interval (max.poll.interval.ms) exceeded" error ? #470

Open
@askie

Description

  • PHP version: 7.1
  • librdkafka version: 1.8.2.255
  • php-rdkafka version: 5.0
  • kafka version: 2

my configuration:

<?php
$conf = new RdKafka\Conf();
// Add the two settings below for a more verbose output
$conf->set('log_level', (string) LOG_DEBUG);
$conf->set('debug', 'all');

 $conf->set('enable.auto.commit', 'false');
$conf->set('max.poll.interval.ms', 6000);

when callback function sleep more then 6000ms
log show:

%4|1634714275.038|MAXPOLL|rdkafka#consumer-1| [thrd:main]: Application maximum poll interval (8000ms) exceeded by 494ms (adjust max.poll.interval.ms for long-running message processing): leaving group

and the $consumer is still working in CLI ,
how can I catch the error to restart $consumer in CLI ?

==================
if set :
$conf->set('enable.auto.commit', 'true');

when $consupmer exec more then 6000ms , will get a Exception:
Local: Maximum application poll interval (max.poll.interval.ms) exceeded

this is what I want to catch.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions