Skip to content

Consumer commit() None parameters #1642

@beszabo1

Description

@beszabo1

Description

(Changing a discussion to an issue, since it is fairly straightforward)

From python, calling a Consumer's commit function with parameters set to None (or other python False values) will resolve as boolean true in Consumer.c's checks, so instead of disregarding them, the function returns different errors.

How to reproduce

The issue can be seen when calling one of these:

consumer.commit(message=None)
consumer.commit(offsets=None)
consumer.commit(message=None, offsets=None)

But as a note:

kwargs = {'async': False }
consumer.commit(**kwargs)

and

consumer.commit(asynchronous=False)

work as expected.

Additionally

I suspect this is the line where it happens, but am not familiar:
https://github.com/confluentinc/confluent-kafka-python/blob/master/src/confluent_kafka/src/Consumer.c#L468C12-L468C12

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugReporting an unexpected or problematic behavior of the codebasepriority:highMaintainer triage tag for indicating high impact or criticality issuesstatus:help-wantedIssues that would especially appreciate external development or attention

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy