NATS · Schema
NATS JetStream Stream Configuration
Schema for configuring a NATS JetStream stream.
Cloud-NativeIoTMessage BrokerMicroservicesPub-Sub
Properties
| Name | Type | Description |
|---|---|---|
| name | string | A unique name for the stream |
| description | string | Optional description for the stream |
| subjects | array | A list of subjects to consume, supports wildcards |
| retention | string | How messages are retained in the stream |
| max_consumers | integer | Maximum number of consumers, -1 for unlimited |
| max_msgs | integer | Maximum number of messages, -1 for unlimited |
| max_bytes | integer | Maximum total bytes, -1 for unlimited |
| max_age | integer | Maximum age in nanoseconds, 0 for unlimited |
| max_msg_size | integer | Maximum message size in bytes |
| storage | string | Storage backend type |
| num_replicas | integer | Number of stream replicas |
| discard | string | Discard policy when stream limits are reached |
| duplicate_window | integer | Window within which to track duplicate messages in nanoseconds |
| allow_rollup_hdrs | boolean | Allow rollup headers to purge subjects |
| deny_delete | boolean | Deny message deletion via API |
| deny_purge | boolean | Deny stream purge via API |
| allow_direct | boolean | Allow direct message access |
| mirror | object | Mirror configuration for stream mirroring |
| sources | array | Sources for stream sourcing |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://api-evangelist.com/schemas/nats/nats-stream-config.json",
"title": "NATS JetStream Stream Configuration",
"description": "Schema for configuring a NATS JetStream stream.",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "A unique name for the stream"
},
"description": {
"type": "string",
"description": "Optional description for the stream"
},
"subjects": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of subjects to consume, supports wildcards"
},
"retention": {
"type": "string",
"enum": ["limits", "interest", "workqueue"],
"default": "limits",
"description": "How messages are retained in the stream"
},
"max_consumers": {
"type": "integer",
"default": -1,
"description": "Maximum number of consumers, -1 for unlimited"
},
"max_msgs": {
"type": "integer",
"default": -1,
"description": "Maximum number of messages, -1 for unlimited"
},
"max_bytes": {
"type": "integer",
"default": -1,
"description": "Maximum total bytes, -1 for unlimited"
},
"max_age": {
"type": "integer",
"default": 0,
"description": "Maximum age in nanoseconds, 0 for unlimited"
},
"max_msg_size": {
"type": "integer",
"default": -1,
"description": "Maximum message size in bytes"
},
"storage": {
"type": "string",
"enum": ["file", "memory"],
"default": "file",
"description": "Storage backend type"
},
"num_replicas": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"default": 1,
"description": "Number of stream replicas"
},
"discard": {
"type": "string",
"enum": ["old", "new"],
"default": "old",
"description": "Discard policy when stream limits are reached"
},
"duplicate_window": {
"type": "integer",
"description": "Window within which to track duplicate messages in nanoseconds"
},
"allow_rollup_hdrs": {
"type": "boolean",
"default": false,
"description": "Allow rollup headers to purge subjects"
},
"deny_delete": {
"type": "boolean",
"default": false,
"description": "Deny message deletion via API"
},
"deny_purge": {
"type": "boolean",
"default": false,
"description": "Deny stream purge via API"
},
"allow_direct": {
"type": "boolean",
"default": false,
"description": "Allow direct message access"
},
"mirror": {
"type": "object",
"description": "Mirror configuration for stream mirroring",
"properties": {
"name": {
"type": "string"
},
"opt_start_seq": {
"type": "integer"
},
"filter_subject": {
"type": "string"
}
}
},
"sources": {
"type": "array",
"description": "Sources for stream sourcing",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"opt_start_seq": {
"type": "integer"
},
"filter_subject": {
"type": "string"
}
}
}
}
},
"required": ["name"]
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/nats-stream-config"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.