...
POST [base_url]/topics/[topic]/rollback
Request Schema
{ "transactionWritePointer" : "long", "rollbackKeys" : { "type" : "array", "items" : "bytes" } }Body
- Use the response body as is from the publish call above
Response:
404 NOT FOUND if topic is not present
200 OK if messages are rolled back
...
- Request method and URI
POST [base_url]/topics/[topic]/poll
Request Schema
startFromCode Block language js { "
[type" :
bytes"
longrecord", "
, "name"
: "ConsumeRequest", "fields" : [ { "name" : "startFrom", "type" : [ "bytes", "long", "null" ] }, { "name" : "inclusive", "type" : "boolean" }, { "name" : "limit", "type" : [ "integer", "null" ] }, { "name" : "transaction", "type" : [ "bytes"
, "null" ] } ] }
- Response Schema (will be in JSON or Avro binary based on the request Content-Type)
{ "type" : "array", "items" : {"type": "record", "name": "Message", "fields": [ { "name" : "id" , "type" : "bytes" }, {"name" : "payload" : "type" : "bytes" }] }}
- Request body
- Can be Avro binary or JSON, based on the request - Content-Type: application/json or avro/binary
Schema Fields:
i) startFrom - can be bytes in which case it is considered as messageId, can be long in which case it is considered as timestamp
ii) inclusive - boolean field that says whether the messageId/timestamp should be inclusive
iii) limit - max number of responses to return [an hard limit will be set by the TransactionServer which will be a cConf property]
iv) transaction - serialized bytes (TransactionCodec) of the transaction object
...