Is there a way to produce Kafka messages with headers using Kafka Confluent REST API?

ArmWich

I'm trying to send messages to Kafka with some custom headers, but I could't find a way to do it. According to the documatation, The POST /topics/(string: topic_name) API does not have a way to attach custom headers to messages.

Does anyone know a way to send Kafka messages with custom headers through the confluent Kafka REST API?

Here is my sample request body I sent to the REST proxy

POST /topics/stream.mycustomtopic

{
    "records": [{
        "value": "{\"myFirstKey\":\"myFirstValue\"}"
    }]
}
Robin Moffatt

You are correct, the REST Proxy does not currently support Kafka Headers. You would need to use the Producer API to set the headers.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Kafka Confluent REST API: Kafka Included?

confluent kafka rest avrò producer

How can I produce messages with Kafka 8.2 API in Java?

How to read batch messages in confluent kafka python?

How to produce messages to selected partition using kafka-console-producer?

Confluent's Kafka REST Proxy vs Kafka Client

Need to move small JSON messages from Kafka to HDFS with Kakfa Connect but without using Confluent libs, if not completely free

OracleGoldengate BigData for Kafka does not produce UPDATE messages

How to produce Kafka messages with JSON format in Python

Kafka is slow to produce messages in first seconds

Using kafka to produce data for clickhouse

Stream Kafka messages in REST endpoint

JSONParseException reading data using Kafka rest API

Using a connector with Helm-installed Kafka/Confluent

Produce messages to IBM MQ using REST API. Apache Camel

How to create a Kafka Topic using Confluent.Kafka .Net Client

Kafka Best Way to Filter Messages

Producing and Consuming Avro messages from Kafka without Confluent components

Errors upgrading Confluent.Kafka Unit test Messages .NET Core

Kafka Implementation for Rest API

Is there a way to do a Kafka poll using spring-kafka - which retrives the list of new messages?

Handling bad messages using Kafka's Streams API

Filter messages using native apache Kafka consumers api before poll

Read current incrementing value of Confluent Kafka Source Connector with Rest?

How to use acknowledgement when reading messages from kafka topic in confluent kafka go?

Confluent - Splitting Avro messages from one kafka topic into multiple kafka topics

Can single Kafka producer produce messages to multiple topics and how?

Kafka Broker throws error for clients that produce snappy compressed messages

Kafka confluent proxy api - send message - Internal server error