Skip to content

Commit

Permalink
Add schema
Browse files Browse the repository at this point in the history
  • Loading branch information
nickdnk committed Oct 23, 2024
1 parent e8ab696 commit 86d4339
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"title": "roadrunner-nats",
"type": "object",
"description": "The schema contains all the valid configuration parameters for the NATS plugin for the roadrunner job system.",
"additionalProperties": false,
"properties": {
"driver": {
"type": "string",
"enum": [
"nats"
]
},
"config": {
"type": "object",
"description": "Configuration for the NATS driver.",
"additionalProperties": false,
"properties": {
"priority": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/priority"
},
"prefetch": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/prefetch"
},
"consume_all": {
"$ref": "https://raw.githubusercontent.com/roadrunner-server/jobs/refs/heads/master/schema.json#/definitions/PipelineProperties/consume_all"
},
"subject": {
"description": "NATS subject",
"type": "string",
"default": "default"
},
"stream": {
"description": "NATS stream",
"type": "string",
"default": "default-stream"
},
"deliver_new": {
"description": "Whether to only receive messages that were created after the consumer was created.",
"type": "boolean",
"default": false
},
"rate_limit": {
"description": "Consumer rate-limiter in bytes. See https://docs.nats.io/jetstream/concepts/consumers#ratelimit",
"type": "integer",
"default": 1000,
"minimum": 0
},
"delete_stream_on_stop": {
"description": "Whether to delete the stream after the pipeline is stopped.",
"type": "boolean",
"default": false
},
"delete_after_ack": {
"description": "Whether to delete messages from the stream after successful acknowledgement.",
"type": "boolean",
"default": false
}
}
}
}
}

0 comments on commit 86d4339

Please sign in to comment.