[Python] Publishing an AVRRR messages to topic via Kafka REST

Discussão em 'Python' iniciado por Stack, Julho 17, 2025.

  1. Stack

    Stack Membro Participativo

    The REST Proxy automatically talks to the Schema Registry. You can either provide the full Avro schema in your request (and the REST Proxy will register it if new, or use an existing compatible one) or, if the schema's already registered, just provide its value_schema_id (or key_schema_id).

    • JSON Format: Even though it's Avro, the messages are sent as JSON, with your actual Avro data nested within a records array. Each record can have a key and/or a value.

    Step-by-Step Example with curl

    Let's imagine your Kafka REST Proxy is accessible at http://localhost:8082 and you have a topic called my_avro_topic.

    Scenario 1: Providing the Avro Schema Directly

    This is perfect when you're sending a message with a brand-new schema or want the REST Proxy to handle the schema registration for you.

    Example Avro

    Continue reading...

Compartilhe esta Página