Skip to content

Client silently stops receiving after NodeNotReadyError #1572

Closed
@ghost

Description

Below is a pseudo-code that illustrates the problem:

def consume_forever(consumer):
    for message in consumer.receive():
        yield message
    consumer.close()

def consume_some(consumer, condition):
    for message in consume_forever(consumer):
        if condition(message):
            break
    else:
        raise RuntimeError('Should not happen')

The Should not happen error is, in fact raised. In the logs, I can see this:

base.py                    317 ERROR    Error sending OffsetCommitRequest_v2 to node 4 [NodeNotReadyError: 4]

Expected Result

I would expect that in case consumer decides to stop consuming it raises a relevant error, that allows the user code to adjust its operation accordingly, or, even better, deal with it internally, using some configurable policies, s.a. number of retries, or retry until deadline etc. It doesn't make sense to stop the consumer unless it is specifically requested by the user code, or an error condition occurs.

Metadata

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