title | language_tabs | toc_footers | includes | search | code_clipboard | highlight_theme | headingLevel | generator | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
httpmq v0.4.1-rc.4 |
|
false |
true |
darkula |
2 |
widdershins v4.0.1 |
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
HTTP/2 based message broker built around NATS JetStream
Base URLs:
GET /v1/admin/alive
Will return success to indicate management REST API module is live
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | string |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
GET /v1/admin/ready
Will return success if management REST API module is ready for use
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | string |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
GET /v1/admin/stream
Query for the details of all streams
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"streams": {
"property1": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
},
"property2": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
}
},
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | apis.APIRestRespAllJetStreams |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
POST /v1/admin/stream
Define new JetStream stream
Body parameter
{
"max_age": 0,
"max_bytes": -1,
"max_consumers": -1,
"max_msg_size": -1,
"max_msgs": -1,
"max_msgs_per_subject": -1,
"name": "string",
"subjects": [
"string"
]
}
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
body | body | management.JSStreamParam | true | JetStream stream setting |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
DELETE /v1/admin/stream/{streamName}
Delete a stream
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
GET /v1/admin/stream/{streamName}
Query for the details of one stream
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"stream": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
},
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | apis.APIRestRespOneJetStream |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
GET /v1/admin/stream/{streamName}/consumer
Query for the details of all consumers of a stream
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
Example responses
200 Response
{
"consumers": {
"property1": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
},
"property2": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
}
},
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | apis.APIRestRespAllJetStreamConsumers |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
POST /v1/admin/stream/{streamName}/consumer
Create a new consumer on a stream. The stream must already be defined.
Body parameter
{
"ack_wait": 0,
"delivery_group": "string",
"filter_subject": "string",
"max_inflight": 1,
"max_retry": -1,
"mode": "push",
"name": "string",
"notes": "string"
}
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
body | body | management.JetStreamConsumerParam | true | Consumer parameters |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
DELETE /v1/admin/stream/{streamName}/consumer/{consumerName}
Delete one consumer of a stream
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
consumerName | path | string | true | JetStream consumer name |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
GET /v1/admin/stream/{streamName}/consumer/{consumerName}
Query for the details of a consumer on a stream
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
consumerName | path | string | true | JetStream consumer name |
Example responses
200 Response
{
"consumer": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
},
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | apis.APIRestRespOneJetStreamConsumer |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
PUT /v1/admin/stream/{streamName}/limit
Change the data retention limits of a stream
Body parameter
{
"max_age": 0,
"max_bytes": -1,
"max_consumers": -1,
"max_msg_size": -1,
"max_msgs": -1,
"max_msgs_per_subject": -1
}
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
body | body | management.JSStreamLimits | true | New stream limits |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
PUT /v1/admin/stream/{streamName}/subject
Change the list of subjects of interest for a stream
Body parameter
{
"subjects": [
"string"
]
}
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
body | body | apis.APIRestReqStreamSubjects | true | List of new subjects |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
GET /v1/data/alive
Will return success to indicate dataplane REST API module is live
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | string |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
GET /v1/data/ready
Will return success if dataplane REST API module is ready for use
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | string |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
GET /v1/data/stream/{streamName}/consumer/{consumerName}
Establish a JetStream push subscribe session for a client. This is a long lived
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
consumerName | path | string | true | JetStream consumer name |
subject_name | query | string | true | JetStream subject to subscribe to |
max_msg_inflight | query | integer | false | Max number of inflight messages (DEFAULT: 1) |
delivery_group | query | string | false | Needed if consumer uses delivery groups |
Example responses
200 Response
{
"b64_msg": "SGVsbG8gV29ybGQK",
"consumer": "string",
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"sequence": {
"consumer": 0,
"stream": 0
},
"stream": "string",
"subject": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | apis.APIRestRespDataMessage |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
POST /v1/data/stream/{streamName}/consumer/{consumerName}/ack
Process JetStream message ACK for a stream / consumer
Body parameter
{
"consumer": 0,
"stream": 0
}
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
streamName | path | string | true | JetStream stream name |
consumerName | path | string | true | JetStream consumer name |
body | body | dataplane.AckSeqNum | true | Message message sequence numbers |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
POST /v1/data/subject/{subjectName}
Publish a Base64 encoded message to a JetStream subject
Body parameter
string
Name | In | Type | Required | Description |
---|---|---|---|---|
Httpmq-Request-ID | header | string | false | User provided request ID to match against logs |
subjectName | path | string | true | JetStream subject to publish under |
body | body | string | true | Message to publish in Base64 encoding |
Example responses
200 Response
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | success | goutils.RestAPIBaseResponse |
400 | Bad Request | error | goutils.RestAPIBaseResponse |
404 | Not Found | error | string |
500 | Internal Server Error | error | goutils.RestAPIBaseResponse |
Status | Header | Type | Format | Description |
---|---|---|---|---|
200 | Httpmq-Request-ID | string | Request ID to match against logs | |
400 | Httpmq-Request-ID | string | Request ID to match against logs | |
500 | Httpmq-Request-ID | string | Request ID to match against logs |
{
"subjects": [
"string"
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
subjects | [string] | true | none | Subjects the list of new subject this stream will listen to |
{
"consumers": {
"property1": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
},
"property2": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
}
},
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consumers | object | false | none | Consumers the set of consumer details mapped against consumer name |
» additionalProperties | apis.APIRestRespConsumerInfo | false | none | none |
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
success | boolean | true | none | Success indicates whether the request was successful |
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"streams": {
"property1": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
},
"property2": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
}
},
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
streams | object | false | none | Streams the set of stream details mapped against its names |
» additionalProperties | apis.APIRestRespStreamInfo | false | none | none |
success | boolean | true | none | Success indicates whether the request was successful |
{
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ack_wait | integer | true | none | AckWait duration (ns) to wait for an ACK for the delivery of a message |
deliver_group | string | false | none | DeliverGroup is the delivery group if this consumer uses delivery group A consumer using delivery group allows multiple clients to subscribe under the same consumer and group name tuple. For subjects this consumer listens to, the messages will be shared amongst the connected clients. |
deliver_subject | string | false | none | DeliverSubject subject this consumer is listening on |
filter_subject | string | false | none | FilterSubject sets the consumer to filter for subjects matching this NATs subject string See https://docs.nats.io/nats-concepts/subjects |
max_ack_pending | integer | false | none | MaxAckPending controls the max number of un-ACKed messages permitted in-flight |
max_deliver | integer | false | none | MaxDeliver max number of times a message can be deliveried (including retry) to this consumer |
max_waiting | integer | false | none | MaxWaiting NATS JetStream does not clearly document this |
notes | string | false | none | Description an optional description of the consumer |
{
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ack_floor | apis.APIRestRespSequenceInfo | true | none | AckFloor is the sequence number of the last received ACKed For messages which failed to be ACKed (retry limit reached), the floor moves up to include these message sequence numbers indicating these messages will not be retried. |
config | apis.APIRestRespConsumerConfig | true | none | Config are the consumer config parameters |
created | string | true | none | Created is when this consumer was defined |
delivered | apis.APIRestRespSequenceInfo | true | none | Delivered is the sequence number of the last message delivered |
name | string | true | none | Name is the name of the consumer |
num_ack_pending | integer | true | none | NumAckPending is the number of ACK pending / messages in-flight |
num_pending | integer | true | none | NumPending is the number of message to be delivered for this consumer |
num_redelivered | integer | true | none | NumRedelivered is the number of messages redelivered |
num_waiting | integer | true | none | NumWaiting NATS JetStream does not clearly document this |
stream_name | string | true | none | Stream is the name of the stream |
{
"b64_msg": "SGVsbG8gV29ybGQK",
"consumer": "string",
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"sequence": {
"consumer": 0,
"stream": 0
},
"stream": "string",
"subject": "string",
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
b64_msg | string(base64) | true | none | Message is the message body |
consumer | string | true | none | Consumer is the name of the consumer |
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
sequence | dataplane.MsgToDeliverSeq | true | none | Sequence is the sequence numbers for this JetStream message |
stream | string | true | none | Stream is the name of the stream |
subject | string | true | none | Subject is the name of the subject / subject filter |
success | boolean | true | none | Success indicates whether the request was successful |
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"stream": {
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
},
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
stream | apis.APIRestRespStreamInfo | false | none | Stream the details for this stream |
success | boolean | true | none | Success indicates whether the request was successful |
{
"consumer": {
"ack_floor": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"config": {
"ack_wait": 0,
"deliver_group": "string",
"deliver_subject": "string",
"filter_subject": "string",
"max_ack_pending": 0,
"max_deliver": 0,
"max_waiting": 0,
"notes": "string"
},
"created": "string",
"delivered": {
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
},
"name": "string",
"num_ack_pending": 0,
"num_pending": 0,
"num_redelivered": 0,
"num_waiting": 0,
"stream_name": "string"
},
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consumer | apis.APIRestRespConsumerInfo | false | none | Consumer the details regarding this consumer |
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
success | boolean | true | none | Success indicates whether the request was successful |
{
"consumer_seq": 0,
"last_active": "string",
"stream_seq": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consumer_seq | integer | true | none | Consumer is consumer level sequence number |
last_active | string | false | none | Last timestamp when these values updated |
stream_seq | integer | true | none | Stream is stream level sequence number |
{
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
description | string | false | none | Description is an optional description of the stream |
max_age | integer | true | none | MaxBytes is the max duration (ns) the stream will store a message Messages breaching the limit will be removed. |
max_bytes | integer | true | none | MaxBytes is the max number of message bytes the stream will store. Oldest messages are removed once limit breached. |
max_consumers | integer | true | none | MaxConsumers is the max number of consumers allowed on the stream |
max_msg_size | integer | false | none | MaxMsgSize is the max size of a message allowed in this stream |
max_msgs | integer | true | none | MaxMsgs is the max number of messages the stream will store. Oldest messages are removed once limit breached. |
max_msgs_per_subject | integer | true | none | MaxMsgsPerSubject is the maximum number of subjects allowed on this stream |
name | string | true | none | Name is the stream name |
subjects | [string] | false | none | Subjects is the list subjects this stream is listening on |
{
"config": {
"description": "string",
"max_age": 0,
"max_bytes": 0,
"max_consumers": 0,
"max_msg_size": 0,
"max_msgs": 0,
"max_msgs_per_subject": 0,
"name": "string",
"subjects": [
"string"
]
},
"created": "string",
"state": {
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
config | apis.APIRestRespStreamConfig | true | none | Config is the stream config parameters |
created | string | true | none | Created is the stream creation timestamp |
state | apis.APIRestRespStreamState | true | none | State is the stream current state |
{
"bytes": 0,
"consumer_count": 0,
"first_seq": 0,
"first_ts": "string",
"last_seq": 0,
"last_ts": "string",
"messages": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
bytes | integer | true | none | Bytes is the number of message bytes in the stream |
consumer_count | integer | true | none | Consumers number of consumers on the stream |
first_seq | integer | true | none | FirstSeq is the oldest message sequence number on the stream |
first_ts | string | true | none | FirstTime is the oldest message timestamp on the stream |
last_seq | integer | true | none | LastSeq is the newest message sequence number on the stream |
last_ts | string | true | none | LastTime is the newest message timestamp on the stream |
messages | integer | true | none | Msgs is the number of messages in the stream |
{
"consumer": 0,
"stream": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consumer | integer | true | none | Consumer is the JetStream message sequence number for this consumer |
stream | integer | true | none | Stream is the JetStream message sequence number for this stream |
{
"consumer": 0,
"stream": 0
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
consumer | integer | true | none | Consumer is the message sequence number for this consumer |
stream | integer | true | none | Stream is the message sequence number within the stream |
{
"code": 0,
"detail": "string",
"message": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer | true | none | Code is the response code |
detail | string | false | none | Detail is an optional descriptive message providing additional details on the error |
message | string | false | none | Msg is an optional descriptive message |
{
"error": {
"code": 0,
"detail": "string",
"message": "string"
},
"request_id": "string",
"success": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error | goutils.ErrorDetail | false | none | Error are details in case of errors |
request_id | string | true | none | RequestID gives the request ID to match against logs |
success | boolean | true | none | Success indicates whether the request was successful |
{
"max_age": 0,
"max_bytes": -1,
"max_consumers": -1,
"max_msg_size": -1,
"max_msgs": -1,
"max_msgs_per_subject": -1
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
max_age | integer | false | none | MaxAge is the max duration (ns) the stream will store a message Messages breaching the limit will be removed. |
max_bytes | integer | false | none | MaxBytes is the max number of message bytes the stream will store. Oldest messages are removed once limit breached. |
max_consumers | integer | false | none | MaxConsumers is the max number of consumers allowed on the stream |
max_msg_size | integer | false | none | MaxMsgSize is the max size of a message allowed in this stream |
max_msgs | integer | false | none | MaxMsgs is the max number of messages the stream will store. Oldest messages are removed once limit breached. |
max_msgs_per_subject | integer | false | none | MaxMsgsPerSubject is the maximum number of subjects allowed on this stream |
{
"max_age": 0,
"max_bytes": -1,
"max_consumers": -1,
"max_msg_size": -1,
"max_msgs": -1,
"max_msgs_per_subject": -1,
"name": "string",
"subjects": [
"string"
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
max_age | integer | false | none | MaxAge is the max duration (ns) the stream will store a message Messages breaching the limit will be removed. |
max_bytes | integer | false | none | MaxBytes is the max number of message bytes the stream will store. Oldest messages are removed once limit breached. |
max_consumers | integer | false | none | MaxConsumers is the max number of consumers allowed on the stream |
max_msg_size | integer | false | none | MaxMsgSize is the max size of a message allowed in this stream |
max_msgs | integer | false | none | MaxMsgs is the max number of messages the stream will store. Oldest messages are removed once limit breached. |
max_msgs_per_subject | integer | false | none | MaxMsgsPerSubject is the maximum number of subjects allowed on this stream |
name | string | true | none | Name is the stream name |
subjects | [string] | false | none | Subjects is the list of subjects of interest for this stream |
{
"ack_wait": 0,
"delivery_group": "string",
"filter_subject": "string",
"max_inflight": 1,
"max_retry": -1,
"mode": "push",
"name": "string",
"notes": "string"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ack_wait | integer | false | none | AckWait when specified, the number of ns to wait for ACK before retry |
delivery_group | string | false | none | DeliveryGroup creates a consumer using a delivery group name. A consumer using delivery group allows multiple clients to subscribe under the same consumer and group name tuple. For subjects this consumer listens to, the messages will be shared amongst the connected clients. |
filter_subject | string | false | none | FilterSubject sets the consumer to filter for subjects matching this NATs subject string See https://docs.nats.io/nats-concepts/subjects |
max_inflight | integer | true | none | MaxInflight is max number of un-ACKed message permitted in-flight (must be >= 1) |
max_retry | integer | false | none | MaxRetry max number of times an un-ACKed message is resent (-1: infinite) |
mode | string | true | none | Mode whether the consumer is push or pull consumer |
name | string | true | none | Name is the consumer name |
notes | string | false | none | Notes are descriptions regarding this consumer |
Property | Value |
---|---|
mode | push |
mode | pull |