Consume Service
Overview
The consume service can be used to consume messages from a stream. The Rest Proxy supports multiple datatypes for key and value. Headers are returned as name and list of not supported
API Specification
Endpoint |
<baseurl>/stream/{environment}/{stream} |
|
HTTP Method |
|
|
Path Variable |
|
The environment short name as specified in the Self Service definition |
Path Variable |
|
The stream name as specified in the Self Service definition |
Request |
||
HTTP Header |
|
|
HTTP Header |
|
(required) The unique consumer instance id (example, 5 parallel consumers would use different consumer uuid) |
HTTP Header |
|
(required) The application id of the the producer application as specified in the Self Service |
HTTP Header |
|
(optional) The version of the the producer application |
HTTP Header |
|
(required) Contains the type of the key data, this should match with the data used in the stream. Can be |
HTTP Header |
|
(required) Contains the type of the value data, this should match with the data used in the stream. Can be |
HTTP Header |
|
(optional) The maximum number of messages to be returned for the call. |
HTTP Header |
|
(optional) This controls if the stream should be read from the begin (EARLIEST) or the end(LATEST) if no offset has been found. Defaults to EARLIEST |
HTTP Header |
|
(required) This controls the offset should be committed on next consume call or immediately after the read for the current consume call. Valid values are |
HTTP Header |
|
(optional) The amount of time to wait for the backend poll to complete. During creation of the backend consumer or rebalance this might result in an empty response. This delay during creation/rebalance should normally not take more than 10 seconds. Default value is 500 |
Response |
||
HTTP Status Code |
200 |
|
HTTP Header |
|
|
HTTP Body |
JSON Object |
|
Error responses |
||
HTTP Status Code |
403 |
Not authorized to access the stream |
HTTP Status Code |
404 |
Stream and environment combination not found |
HTTP Status Code |
500 |
Generic Internal Error |
HTTP Header |
|
|
HTTP Body |
JSON Object |