Browse messages
const url = 'http://localhost:8080/api/v1/clusters/example/topics/example/messages?from=latest&limit=50';const options = {method: 'GET', headers: {cookie: 'brokerium_session=<brokerium_session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8080/api/v1/clusters/example/topics/example/messages?from=latest&limit=50' \ --cookie brokerium_session=<brokerium_session>Role: viewer. Keys, values and header values that are not UTF-8 are returned base64-encoded. The limit is split evenly between the partitions read. Pass next or previous of a response as cursor with from=after or from=before to read the following or the preceding page of every partition.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”One partition; all partitions by default. Ignored with a cursor.
Offsets per partition (0:120,1:98) for from=after and from=before.
Start offset when from=offset.
Start time in Unix milliseconds when from=timestamp.
Responses
Section titled “Responses”Messages.
object
object
object
Omitted for text.
Cursor of the following page; null when every partition was read to its end.
Cursor of the preceding page; null at the start of every partition.
Example
{ "messages": [ { "headers": [ { "encoding": "utf8" } ], "keyEncoding": "utf8", "valueEncoding": "utf8" } ]}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.