Add component definition: vertx-websocket

This commit is contained in:
gitea_admin 2026-03-11 14:34:01 +00:00
parent 65d5b6aa79
commit 533d4bf76f

458
component.json Normal file
View File

@ -0,0 +1,458 @@
{
"component": {
"kind": "component",
"name": "vertx-websocket",
"title": "Vert.x WebSocket",
"description": "Expose WebSocket endpoints and connect to remote WebSocket servers using Vert.x",
"deprecated": false,
"firstVersion": "3.5.0",
"label": "http,networking",
"javaType": "org.apache.camel.component.vertx.websocket.VertxWebsocketComponent",
"supportLevel": "Stable",
"groupId": "org.apache.camel",
"artifactId": "camel-vertx-websocket",
"version": "4.10.2",
"scheme": "vertx-websocket",
"extendsScheme": "",
"syntax": "vertx-websocket:host:port/path",
"async": false,
"api": false,
"consumerOnly": false,
"producerOnly": false,
"lenientProperties": true,
"browsable": false,
"remote": true
},
"headers": {
"CamelVertxWebsocket.connectionKey": {
"index": 0,
"kind": "header",
"displayName": "",
"group": "common",
"label": "",
"required": false,
"javaType": "String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Sends the message to the client with the given connection key. You can use a comma separated list of keys to send a message to multiple clients. Note that this option only applies when producing messages to endpoints hosted by the vertx-websocket consumer and not to an externally hosted WebSocket.",
"constantName": "org.apache.camel.component.vertx.websocket.VertxWebsocketConstants#CONNECTION_KEY"
},
"CamelVertxWebsocket.sendToAll": {
"index": 1,
"kind": "header",
"displayName": "",
"group": "producer",
"label": "producer",
"required": false,
"javaType": "boolean",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "Sends the message to all clients which are currently connected. You can use the sendToAll option on the endpoint instead of using this header. Note that this option only applies when producing messages to endpoints hosted by the vertx-websocket consumer and not to an externally hosted WebSocket.",
"constantName": "org.apache.camel.component.vertx.websocket.VertxWebsocketConstants#SEND_TO_ALL"
},
"CamelVertxWebsocket.remoteAddress": {
"index": 2,
"kind": "header",
"displayName": "",
"group": "consumer",
"label": "consumer",
"required": false,
"javaType": "io.vertx.core.net.SocketAddress",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The remote address.",
"constantName": "org.apache.camel.component.vertx.websocket.VertxWebsocketConstants#REMOTE_ADDRESS"
},
"CamelVertxWebsocket.event": {
"index": 3,
"kind": "header",
"displayName": "",
"group": "consumer",
"label": "consumer",
"required": false,
"javaType": "org.apache.camel.component.vertx.websocket.VertxWebsocketEvent",
"enum": [
"CLOSE",
"ERROR",
"MESSAGE",
"OPEN"
],
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"description": "The WebSocket event that triggered the message exchange.",
"constantName": "org.apache.camel.component.vertx.websocket.VertxWebsocketConstants#EVENT"
}
},
"properties": {
"host": {
"index": 0,
"kind": "path",
"displayName": "Host",
"group": "common",
"label": "",
"required": true,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "WebSocket hostname, such as localhost or a remote host when in client mode."
},
"port": {
"index": 1,
"kind": "path",
"displayName": "Port",
"group": "common",
"label": "",
"required": true,
"type": "integer",
"javaType": "int",
"deprecated": false,
"deprecationNote": "",
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "WebSocket port number to use."
},
"path": {
"index": 2,
"kind": "path",
"displayName": "Path",
"group": "common",
"label": "",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "WebSocket path to use."
},
"allowedOriginPattern": {
"index": 3,
"kind": "parameter",
"displayName": "Allowed Origin Pattern",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Regex pattern to match the origin header sent by WebSocket clients"
},
"allowOriginHeader": {
"index": 4,
"kind": "parameter",
"displayName": "Allow Origin Header",
"group": "consumer",
"label": "producer,consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": true,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Whether the WebSocket client should add the Origin header to the WebSocket handshake request."
},
"consumeAsClient": {
"index": 5,
"kind": "parameter",
"displayName": "Consume As Client",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "When set to true, the consumer acts as a WebSocket client, creating exchanges on each received WebSocket event."
},
"fireWebSocketConnectionEvents": {
"index": 6,
"kind": "parameter",
"displayName": "Fire Web Socket Connection Events",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Whether the server consumer will create a message exchange when a new WebSocket peer connects or disconnects"
},
"handshakeHeaders": {
"index": 7,
"kind": "parameter",
"displayName": "Handshake Headers",
"group": "consumer",
"label": "producer,consumer",
"required": false,
"type": "object",
"javaType": "java.util.Map<java.lang.String, java.lang.Object>",
"prefix": "handshake.",
"multiValue": true,
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Headers to send in the HTTP handshake request. When the endpoint is a consumer, it only works when it consumes a remote host as a client (i.e. consumeAsClient is true)."
},
"maxReconnectAttempts": {
"index": 8,
"kind": "parameter",
"displayName": "Max Reconnect Attempts",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 0,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "When consumeAsClient is set to true this sets the maximum number of allowed reconnection attempts to a previously closed WebSocket. A value of 0 (the default) will attempt to reconnect indefinitely."
},
"originHeaderUrl": {
"index": 9,
"kind": "parameter",
"displayName": "Origin Header Url",
"group": "consumer",
"label": "producer,consumer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "The value of the Origin header that the WebSocket client should use on the WebSocket handshake request. When not specified, the WebSocket client will automatically determine the value for the Origin from the request URL."
},
"reconnectInitialDelay": {
"index": 10,
"kind": "parameter",
"displayName": "Reconnect Initial Delay",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 0,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "When consumeAsClient is set to true this sets the initial delay in milliseconds before attempting to reconnect to a previously closed WebSocket."
},
"reconnectInterval": {
"index": 11,
"kind": "parameter",
"displayName": "Reconnect Interval",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "integer",
"javaType": "int",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": 1000,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "When consumeAsClient is set to true this sets the interval in milliseconds at which reconnecting to a previously closed WebSocket occurs."
},
"router": {
"index": 12,
"kind": "parameter",
"displayName": "Router",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "object",
"javaType": "io.vertx.ext.web.Router",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "To use an existing vertx router for the HTTP server"
},
"serverOptions": {
"index": 13,
"kind": "parameter",
"displayName": "Server Options",
"group": "consumer",
"label": "consumer",
"required": false,
"type": "object",
"javaType": "io.vertx.core.http.HttpServerOptions",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Sets customized options for configuring the HTTP server hosting the WebSocket for the consumer"
},
"bridgeErrorHandler": {
"index": 14,
"kind": "parameter",
"displayName": "Bridge Error Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. Important: This is only possible if the 3rd party component allows Camel to be alerted if an exception was thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not possible. In other situations we may improve the Camel component to hook into the 3rd party component and make this possible for future releases. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"exceptionHandler": {
"index": 15,
"kind": "parameter",
"displayName": "Exception Handler",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.spi.ExceptionHandler",
"optionalPrefix": "consumer.",
"deprecated": false,
"autowired": false,
"secret": false,
"description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the consumer will deal with exceptions, that will be logged at WARN or ERROR level and ignored."
},
"exchangePattern": {
"index": 16,
"kind": "parameter",
"displayName": "Exchange Pattern",
"group": "consumer (advanced)",
"label": "consumer,advanced",
"required": false,
"type": "object",
"javaType": "org.apache.camel.ExchangePattern",
"enum": [
"InOnly",
"InOut"
],
"deprecated": false,
"autowired": false,
"secret": false,
"description": "Sets the exchange pattern when the consumer creates an exchange."
},
"clientOptions": {
"index": 17,
"kind": "parameter",
"displayName": "Client Options",
"group": "producer",
"label": "producer",
"required": false,
"type": "object",
"javaType": "io.vertx.core.http.HttpClientOptions",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Sets customized options for configuring the WebSocket client used in the producer"
},
"clientSubProtocols": {
"index": 18,
"kind": "parameter",
"displayName": "Client Sub Protocols",
"group": "producer",
"label": "producer",
"required": false,
"type": "string",
"javaType": "java.lang.String",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "Comma separated list of WebSocket subprotocols that the client should use for the Sec-WebSocket-Protocol header"
},
"sendToAll": {
"index": 19,
"kind": "parameter",
"displayName": "Send To All",
"group": "producer",
"label": "producer",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "To send to all websocket subscribers. Can be used to configure at the endpoint level, instead of providing the VertxWebsocketConstants.SEND_TO_ALL header on the message. Note that when using this option, the host name specified for the vertx-websocket producer URI must match one used for an existing vertx-websocket consumer. Note that this option only applies when producing messages to endpoints hosted by the vertx-websocket consumer and not to an externally hosted WebSocket."
},
"lazyStartProducer": {
"index": 20,
"kind": "parameter",
"displayName": "Lazy Start Producer",
"group": "producer (advanced)",
"label": "producer,advanced",
"required": false,
"type": "boolean",
"javaType": "boolean",
"deprecated": false,
"autowired": false,
"secret": false,
"defaultValue": false,
"description": "Whether the producer should be started lazy (on the first message). By starting lazy you can use this to allow CamelContext and routes to startup in situations where a producer may otherwise fail during starting and cause the route to fail being started. By deferring this startup to be lazy then the startup failure can be handled during routing messages via Camel's routing error handlers. Beware that when the first message is processed then creating and starting the producer may take a little time and prolong the total processing time of the processing."
},
"sslContextParameters": {
"index": 21,
"kind": "parameter",
"displayName": "Ssl Context Parameters",
"group": "security",
"label": "security",
"required": false,
"type": "object",
"javaType": "org.apache.camel.support.jsse.SSLContextParameters",
"deprecated": false,
"autowired": false,
"secret": false,
"configurationClass": "org.apache.camel.component.vertx.websocket.VertxWebsocketConfiguration",
"configurationField": "configuration",
"description": "To configure security using SSLContextParameters"
}
}
}