...
- Request Schema
{ "tx_write_ptr" : [ "string", "null" ], "messages" : { "type" : "array", "items" : "bytes" }}
- Request body
- Can be avro binary or JSON, based on the request - Content-Type: application/json or avro/binary
Schema Fields:
i) messages - Contains an array of byte arrays that correspond to messages
ii) tx_write_ptr - Corresponds to a transaction write pointer.
...
- Request Schema
{ "messageId" : [ "bytes", "null" ], "timestamp" : [ "string", "null" ], "inclusive" : [ "boolean", "null" ], "limit" : int[ "integer", "null" ], "transaction" : [ "bytes" , "null" ] }
- Response Schema
{ }
- Request body
- Can be avro binary or JSON, based on the request - Content-Type: application/json or avro/binary
Schema Fields:
i) messageId - Contains bytes that correspond to the messageId
ii) timestamp - Timestamp in ms as a string
iii) inclusive - boolean field that says whether the messageId/timestamp should be inclusive
iv) limit - max number of responses to return
v) transaction -serialized bytes of the transaction object
- Request method and URI
POST [base_url]/topics/[topic]/poll
- Request body
Fields (all the fields are optional):
i) messageId: Provide a messageId as an offset into the topic message queue
ii) timestamp: Provide a timestamp as an offset into the topic message queue. Note that either messageId or timestamp needs to be provided. If both are provided, then messageId will be used.
iii) inclusive: This boolean flag indicates whether the offset is inclusive or exclusive
iv) limit: Max number of messages to return, by default it is set to 100.
v) transaction: If message polling needs to be done transactionally, then this
- Response :
404 NOT FOUND if topic is not present
200 OKResponse body contains an array of map of messageId to payload bytes (if no messages are available, then an empty list is returned)avro binary or JSON object based on the request Content-Type.
[{ "messageId1" : payload1}, {"messageId2" : payload2}, ... ]
...