Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"kind": "component",
"name": "wasm",
"title": "Wasm",
"description": "Invoke Wasm functions.",
"description": "Run Wasm programs (WASI Preview 1 command modules) with the message body as standard input.",
"deprecated": false,
"firstVersion": "4.4.0",
"label": "core,script",
Expand All @@ -14,7 +14,7 @@
"version": "4.23.0-SNAPSHOT",
"scheme": "wasm",
"extendsScheme": "",
"syntax": "wasm:functionName",
"syntax": "wasm:module",
"async": false,
"api": false,
"consumerOnly": false,
Expand All @@ -27,9 +27,19 @@
"lazyStartProducer": { "index": 0, "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "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." },
"autowiredEnabled": { "index": 1, "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which then gets configured on the component. This can be used for automatic configuring JDBC data sources, JMS connection factories, AWS Clients, etc." }
},
"headers": {
"CamelWasmExitCode": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Integer", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The exit code of the module: 0 when it returned from its _start function, otherwise the value it passed to proc_exit. Not set when the module trapped, timed out or exceeded maxOutputSize.", "constantName": "org.apache.camel.wasm.Wasm$Headers#EXIT_CODE" },
"CamelWasmStderr": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "What the module wrote to its standard error, decoded as UTF-8. Not set when the module wrote nothing or timed out.", "constantName": "org.apache.camel.wasm.Wasm$Headers#STDERR" }
},
"properties": {
"functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The Function Name" },
"module": { "index": 1, "kind": "parameter", "displayName": "Module", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "Set the module (the distributable, loadable, and executable unit of code in WebAssembly) resource that provides the producer function." },
"lazyStartProducer": { "index": 2, "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." }
"module": { "index": 0, "kind": "path", "displayName": "Module", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The WASI Preview 1 command module to run, as a resource: by default from the classpath, or with a prefix such as classpath:, file: or http:" },
"args": { "index": 1, "kind": "parameter", "displayName": "Args", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "The command line arguments passed to the module, separated by whitespace. Use double quotes around an argument that contains whitespace. The module receives the file name of the module (for example upper.wasm, without scheme, directories or query) as argument zero, followed by these arguments. The arguments are fixed by the route: they cannot be set from message headers." },
"environment": { "index": 2, "kind": "parameter", "displayName": "Environment", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "java.util.Map<java.lang.String, java.lang.Object>", "prefix": "environment.", "multiValue": true, "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "Environment variables for the module, for example environment.LOG_LEVEL=debug. The module sees no environment variables other than these and the headers listed in environmentHeaders; the environment of the JVM is never passed on. This is a multi-value option with prefix: environment." },
"environmentHeaders": { "index": 3, "kind": "parameter", "displayName": "Environment Headers", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "A comma separated allow-list of message headers whose values are passed to the module as environment variables of the same name. Headers usually come from whoever sent the message, so no header reaches the module unless it is listed here. A listed header that is not on the message is left unset. Camel matches header names ignoring case, so listing TENANT also passes a header named tenant, as the variable TENANT. A name may not be listed here and also be configured with environment." },
"failOnNonZeroExit": { "index": 4, "kind": "parameter", "displayName": "Fail On Non Zero Exit", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "Whether a module that exits with a non-zero exit code fails the exchange with a WasmExitCodeException. No new body is set then, but a body that is a stream has been read by the module: it can be read again when handling the failure if stream caching is on (the default). When false, the standard output of the module replaces the message body whatever the exit code, which is available in the CamelWasmExitCode header." },
"maxMemoryPages": { "index": 5, "kind": "parameter", "displayName": "Max Memory Pages", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "The maximum size of the memory of the module, in WebAssembly pages of 64 KiB. Rust and Go programs declare no maximum by default. When the limit is reached, growing the memory fails inside the module, which then usually traps or exits with an error. 0 (the default) keeps the maximum declared by the module. The value must not be lower than the initial size the module declares." },
"maxOutputSize": { "index": 6, "kind": "parameter", "displayName": "Max Output Size", "group": "producer", "label": "", "required": false, "type": "integer", "javaType": "int", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "The maximum number of bytes the module may write to its standard output, and separately to its standard error, which are buffered in memory. A module that writes more is stopped and the exchange fails. 0 (the default) means no limit: a module that keeps writing then fills the heap of the JVM, so set a limit for modules whose output size is not known." },
"timeout": { "index": 7, "kind": "parameter", "displayName": "Timeout", "group": "producer", "label": "", "required": false, "type": "duration", "javaType": "long", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.wasm.WasmConfiguration", "configurationField": "configuration", "description": "The maximum time the module may run for one exchange, in milliseconds. When it is exceeded the module is interrupted and the exchange fails with an ExchangeTimedOutException. When a timeout is set, the module runs on a separate thread while the calling thread waits, and the message body is read into memory before the module starts, instead of being streamed to it. The time to read the body does not count. 0 (the default) means no timeout." },
"lazyStartProducer": { "index": 8, "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." }
}
}
Loading
Loading