Share via


Producer - Produce Message To Topic

Produce records to a topic in Kafka. If producing records to a newly created topic, please wait a few seconds for the topic to show up.

POST https://clustername-kafkarest.azurehdinsight.net/v1/producer/topics/{topic}

URI Parameters

Name In Required Type Description
topic
path True

string

Topic to produce the records to

Request Body

Name Type Description
records

ProducerRecord[]

List of producer records

Responses

Name Type Description
200 OK

string

successful operation

400 Bad Request

Bad Request

401 Unauthorized

Unauthorized

403 Forbidden

Forbidden

404 Not Found

Not Found

500 Internal Server Error

Internal Server Error

Other Status Codes

Method Not Allowed

Definitions

Name Description
ProducerRecord

A producer record

ProducerRecords

List of producer records to produce in one request

ProducerRecord

A producer record

Name Type Description
key

object

Key for producer record

partition

integer (int32)

Partition ID for producer record

value

object

Value for producer record

ProducerRecords

List of producer records to produce in one request

Name Type Description
records

ProducerRecord[]

List of producer records