1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] python kafka doesn't see headers/metadata while kafka ui and kafka go lang does

Discussão em 'Python' iniciado por Stack, Setembro 15, 2025.

  1. Stack

    Stack Membro Participativo

    Kafka-python doesn't see kafka-headers, while kafka golang does. It doesn't see any headers in all the messages.

    Example of code:

    for message in consumer:
    # message value and key are raw bytes -- decode if necessary!
    # e.g., for unicode: `message.value.decode('utf-8')`
    print(
    "%s:%d:%d: key=%s headers=%s"
    % (
    message.topic,
    message.partition,
    message.offset,
    message.key,
    "".join(message.headers),
    )
    )


    Expected: [​IMG] [​IMG]

    Actual: [​IMG]

    Versions:

    python: 3.13/3.10 kafka-python: @ git+https://github.com/dpkp/kafka-python.git@512d0a0b8d71cf7f34f1b23f8a42d52c28af3266 /^2.0.2

    Continue reading...

Compartilhe esta Página