{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/SolaceConsumePluginConfig", "title": "SolaceConsumePluginConfig", "x-speakeasy-entity": "PluginSolaceConsume", "properties": { "config": { "type": "object", "properties": { "flow": { "description": "The flow related configuration.", "type": "object", "properties": { "ack_mode": { "description": "Controls how acknowledgments are generated for received Guaranteed messages. When set to `AUTO`, the messages are positively acknowledged upon receiving them. When set to 'CLIENT', the messages are positively or negatively acknowledged by Kong regarding to client delivery status.", "type": "string", "default": "CLIENT", "enum": [ "AUTO", "CLIENT" ] }, "binds": { "type": "array", "items": { "properties": { "name": { "description": "The name of the Queue that is the target of the bind. You can use $(uri_captures['']) in this field (replace `` with a real value, for example `$uri_captures['queue']` when the matched route has a path `~/(?[a-z]+)`)", "type": "string" }, "type": { "description": "The type of object to which this Flow is bound.", "type": "string", "default": "QUEUE", "enum": [ "QUEUE" ] } }, "required": [ "name" ], "type": "object" }, "minLength": 1 }, "functions": { "description": "The Lua functions that manipulates the message being received from Solace. The `message` variable can be used to access the current message content, and the function can return a new content.", "type": "array", "items": { "type": "string" } }, "max_unacked_messages": { "description": "This property controls the maximum number of messages that may be unacknowledged on the Flow.", "type": "integer", "default": -1 }, "properties": { "description": "Additional Solace flow properties (each setting needs to have `FLOW_` prefix).", "type": "object", "additionalProperties": { "type": "string", "x-lua-required": true, "x-referenceable": true } }, "selector": { "description": "The selector when binding to an endpoint.", "type": "string" }, "wait_timeout": { "description": "Specifies in milliseconds how long to wait for messages to appear on each poll before giving up or retrying.", "type": "integer", "default": 50, "maximum": 5000, "minimum": 1 }, "window_size": { "description": "The Guaranteed message window size for the Flow.", "type": "integer", "default": 255, "maximum": 255, "minimum": 1 } }, "required": [ "binds" ] }, "mode": { "description": "The mode of operation for the plugin. The `AUTO` determines the mode automatically from the client request.", "type": "string", "default": "POLLING", "enum": [ "AUTO", "POLLING", "SERVER-SENT-EVENTS", "WEBSOCKET" ] }, "polling": { "description": "The `POLLING` mode related configuration settings.", "type": "object", "properties": { "timeout": { "description": "Polling timeout in milliseconds. When set to `0`, the polling works like short-polling and waits at maximum the Flow `wait_timeout` amount of time for the new messages (short-polling). When set to larger than `0`, the connection is kept open and only closed after the timeout or in case messages appear earlier (long-polling).", "type": "integer", "default": 0, "maximum": 300000, "minimum": 0 } } }, "session": { "description": "Session related configuration.", "type": "object", "properties": { "authentication": { "description": "Session authentication related configuration.", "type": "object", "properties": { "access_token": { "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.", "type": "string", "x-encrypted": true, "x-referenceable": true }, "access_token_header": { "description": "Specifies the header that contains access token for the `OAUTH2` authentication scheme when connecting to an event broker. This header takes precedence over the `access_token` field.", "type": "string" }, "basic_auth_header": { "description": "Specifies the header that contains Basic Authentication credentials for the `BASIC` authentication scheme when connecting to an event broker. This header takes precedence over the `username` and `password` fields.", "type": "string" }, "id_token": { "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.", "type": "string", "x-encrypted": true, "x-referenceable": true }, "id_token_header": { "description": "Specifies the header that contains id token for the `OAUTH2` authentication scheme when connecting to an event broker. This header takes precedence over the `id_token` field.", "type": "string" }, "password": { "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.", "type": "string", "maxLength": 128, "x-encrypted": true, "x-referenceable": true }, "scheme": { "description": "The client authentication scheme used when connection to an event broker.", "type": "string", "default": "BASIC", "enum": [ "BASIC", "NONE", "OAUTH2" ] }, "username": { "description": "The username used with `BASIC` authentication scheme when connecting to an event broker.", "type": "string", "maxLength": 189, "x-encrypted": true, "x-referenceable": true } } }, "calculate_message_expiry": { "description": "If this property is true and time-to-live has a positive value in a message, the expiration time is calculated when the message is sent or received", "type": "boolean", "default": true }, "connect_timeout": { "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).", "type": "integer", "default": 3000, "maximum": 100000, "minimum": 100 }, "generate_rcv_timestamps": { "description": "When enabled, a receive timestamp is recorded for each message.", "type": "boolean", "default": true }, "generate_send_timestamps": { "description": "When enabled, a send timestamp is automatically included (if not already present) in the Solace-defined fields for each message sent.", "type": "boolean", "default": true }, "generate_sender_id": { "description": "When enabled, a sender id is automatically included (if not already present) in the Solace-defined fields for each message sent.", "type": "boolean", "default": true }, "generate_sequence_number": { "description": "When enabled, a sequence number is automatically included (if not already present) in the Solace-defined fields for each message sent.", "type": "boolean", "default": true }, "host": { "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).", "type": "string", "x-referenceable": true }, "properties": { "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix).", "type": "object", "additionalProperties": { "type": "string", "x-lua-required": true, "x-referenceable": true } }, "ssl_validate_certificate": { "description": "Indicates whether the API should validate server certificates with the trusted certificates.", "type": "boolean", "default": true }, "vpn_name": { "description": "The name of the Message VPN to attempt to join when connecting to an event broker.", "type": "string", "maxLength": 32 } }, "required": [ "host" ] }, "websocket": { "description": "The `WEBSOCKET` mode related configuration settings.", "type": "object", "properties": { "max_recv_len": { "description": "Specifies the maximal length of payload allowed when receiving WebSocket frames.", "type": "integer", "default": 65536 }, "max_send_len": { "description": "Specifies the maximal length of payload allowed when sending WebSocket frames.", "type": "integer", "default": 65536 }, "timeout": { "description": "Specifies the network timeout threshold in milliseconds.", "type": "integer", "default": 1000, "maximum": 60000, "minimum": 1 } } } }, "required": [ "flow", "session" ] }, "name": { "const": "solace-consume" }, "protocols": { "description": "A set of strings representing HTTP protocols.", "type": "array", "items": { "enum": [ "grpc", "grpcs", "http", "https" ], "type": "string" }, "format": "set", "default": [ "grpc", "grpcs", "http", "https" ] }, "route": { "description": "If set, the plugin will only activate when receiving requests via the specified route. Leave unset for the plugin to activate regardless of the route being used.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } }, "service": { "description": "If set, the plugin will only activate when receiving requests via one of the routes belonging to the specified Service. Leave unset for the plugin to activate regardless of the Service being matched.", "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" } } } }, "required": [ "config" ] }