Exec

Exec

Scheme: exec
Syntax: exec:executable
Description: The exec component can be used to execute OS system commands.
Deprecated:false
ProducerOnly:true
Async:false
Maven: org.apache.camel/camel-exec/2.18.1.redhat-000021

The exec component can be used to execute OS system commands.

Name Kind Group Required Default Type Enum Description
executable path producer true java.lang.String Sets the executable to be executed. The executable must not be empty or null.
bridgeErrorHandler parameter consumer boolean Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exceptionHandler parameter consumer (advanced) org.apache.camel.spi.ExceptionHandler To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions, that will be logged at WARN/ERROR level and ignored.
exchangePattern parameter consumer (advanced) org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the exchange pattern when the consumer creates an exchange.
args parameter producer java.lang.String The arguments may be one or many whitespace-separated tokens.
binding parameter producer org.apache.camel.component.exec.ExecBinding A reference to a org.apache.commons.exec.ExecBinding in the Registry.
commandExecutor parameter producer org.apache.camel.component.exec.ExecCommandExecutor A reference to a org.apache.commons.exec.ExecCommandExecutor in the Registry that customizes the command execution. The default command executor utilizes the commons-exec library, which adds a shutdown hook for every executed command.
outFile parameter producer java.lang.String The name of a file, created by the executable, that should be considered as its output. If no outFile is set, the standard output (stdout) of the executable will be used instead.
timeout parameter producer long The timeout, in milliseconds, after which the executable should be terminated. If execution has not completed within the timeout, the component will send a termination request.
useStderrOnEmptyStdout parameter producer boolean A boolean indicating that when stdout is empty, this component will populate the Camel Message Body with stderr. This behavior is disabled (false) by default.
workingDir parameter producer java.lang.String The directory in which the command should be executed. If null, the working directory of the current process will be used.
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported).