Produce one message
POST
/api/v1/clusters/{id}/topics/{topic}/messages
const url = 'http://localhost:8080/api/v1/clusters/example/topics/example/messages';const options = { method: 'POST', headers: { cookie: 'brokerium_session=<brokerium_session>', 'X-Brokerium-Request': '1', 'Content-Type': 'application/json' }, body: '{"partition":1,"key":"example","value":"example","headers":[{"key":"example","value":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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", "value": "example", "headers": [ { "key": "example", "value": "example" } ] }'Role: operator.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
topic
required
string
Header Parameters
Section titled “Header Parameters”X-Brokerium-Request
required
string
Required on every non-GET request.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
partition
integer | null format: int32
key
string | null
value
required
string
headers
Array<object>
object
key
required
string
value
required
string
Example generated
{ "partition": 1, "key": "example", "value": "example", "headers": [ { "key": "example", "value": "example" } ]}Responses
Section titled “Responses”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.