Every Kafka cluster’s page has a Manage Topics view, with three tabs:
Tab
What you can do
Configuration
List topics; create, change and delete them. Partitions can only grow
Messages
Read messages on a topic, oldest or newest first, ten at a time. Reading never affects the applications consuming the topic
Schemas
Browse the cluster’s Schema Registry: subjects, their versions and each schema. Read-only
Confluent Platform on VMs shows Configuration only.
Creating, changing and deleting topics is shown in every interface, including Terraform, on each platform’s page, for example Apache Kafka. Message contents are never written to logs.
packagemainimport("bytes""crypto/rand""encoding/hex""encoding/json""net/http""os")constapi="https://api.example.com/organizations/<org>"// newKey returns a random idempotency key.funcnewKey()string{b:=make([]byte,16)rand.Read(b)returnhex.EncodeToString(b)}// call sends one request with the access token and a JSON body (or none).// An optional idempotency key is sent as the Idempotency-Key header.funccall(method,pathstring,bodyany,idempotencyKey...string)(*http.Response,error){varbufbytes.Bufferifbody!=nil{iferr:=json.NewEncoder(&buf).Encode(body);err!=nil{returnnil,err}}req,err:=http.NewRequest(method,api+path,&buf)iferr!=nil{returnnil,err}req.Header.Set("Authorization","Bearer "+os.Getenv("STREAMTIME_TOKEN"))req.Header.Set("Content-Type","application/json")iflen(idempotencyKey)>0{req.Header.Set("Idempotency-Key",idempotencyKey[0])}returnhttp.DefaultClient.Do(req)}
Browse messages
Open the cluster and select Manage Topics, then the Messages tab.
Choose the topic, and Oldest first or Newest first.
Each row shows the partition, offset, timestamp, key and value. Load more to page through.
curl "$API/kafka/<cluster>/topics/payments/messages/?position=latest"\-H"Authorization: Bearer $STREAMTIME_TOKEN"# Next page: pass the cursor the response returned.
curl "$API/kafka/<cluster>/topics/payments/messages/?cursor=<cursor>"\-H"Authorization: Bearer $STREAMTIME_TOKEN"