confluentinc / kafka-rest

Confluent REST Proxy for Kafka
https://docs.confluent.io/current/kafka-rest/docs/index.html
Other
47 stars 647 forks source link

Consuming messages sent with v3 API results in an empty array when using v2 API #1040

Open rasert opened 2 years ago

rasert commented 2 years ago

I noticed that if I send a message using the rest proxy v3 API, I can't consume it using the v2 API. I always get an empty array no matter how many times I send the request.

I am working with AVRO. When producing the message through v3 api, I set the Content-Type to application/json and set AVRO in the value.type property of the body.

When consuming, I create a consumer with format = avro and I set Accept and Content-Type to "application/vnd.kafka.avro.v2+json" in subsequent requests.

I am running locally with docker compose.

dimitarndimitrov commented 2 years ago

@rasert Thank you for reporting this!

When you say "Rest proxy is v7.1.1" does that indicate the v7.1.1 tag from this repo?

When you say "Kafka is v5.1.2", does that indicate a Confluent Platform version? The same question also applies for Schema Registry.

I will wait for your response on these, but in case 5.1.x is a Confluent Platform version: