Skip to content

Leaving group using High-level consumer #550

Open
@pherrymason

Description

@pherrymason

Description

I'm using the High-level consumer in a long process to read messages from a topic.
And basically my code has this shape:

        $consumer->subscribe($this->topics);
        while (true) {
            $message = $consumer->consume(1000);
            // do my stuff
            $consumer->commit($message);
        }

Doing this, sometimes I get a Application maximum poll interval (300000ms) exceeded by 5ms (adjust max.poll.interval.ms for long-running message processing): leaving group

Reading about this error, I see that one needs to call poll() every iteration, but I don't see this method defined in the High-level consumer. Is it doing it automatically for me?
Is there anything else I need to configure to fix this? (Is not very frequent, but it happens once a month for example)

php-rdkafka Version

6.0.3

librdkafka Version

No response

PHP Version

PHP 8.3

Operating System

No response

Kafka Version

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions