Skip to content

Produce one message

POST
/api/v1/clusters/{id}/topics/{topic}/messages
curl --request POST \
--url http://localhost:8080/api/v1/clusters/example/topics/example/messages \
--header 'Content-Type: application/json' \
--header 'X-Brokerium-Request: 1' \
--cookie brokerium_session=<brokerium_session> \
--data '{ "partition": 1, "key": "example", "keyEncoding": "utf8", "value": "example", "valueEncoding": "utf8", "headers": [ { "key": "example", "value": "example", "encoding": "utf8" } ] }'

Role: operator. A null value produces a tombstone.

id
required
string
topic
required
string
X-Brokerium-Request
required
string
Allowed value: 1

Required on every non-GET request.

Media typeapplication/json
object
partition
integer | null format: int32
key
string | null
keyEncoding
string
default: utf8
Allowed values: utf8 base64
value
required
string | null
valueEncoding
string
default: utf8
Allowed values: utf8 base64
headers
Array<object>
object
key
required
string
value
required
string
encoding

Omitted for text.

string
Allowed values: utf8 base64

Produced.

Media typeapplication/json
object
partition
integer format: int32
offset
integer format: int64

Example generated

{
"partition": 1,
"offset": 1
}

Apache®, Apache Kafka® and Kafka® are either registered trademarks or trademarks of the Apache Software Foundation in the United States and/or other countries. Brokerium is not affiliated with, endorsed by, or sponsored by the Apache Software Foundation.