Shell
Receive the lines a user types at an interactive terminal prompt and print the reply of the route to the terminal.
What’s inside
-
Shell component, URI syntax:
shell:prompt
Please refer to the above links for usage and configuration details.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-shell-starter</artifactId>
</dependency> Spring Boot Auto-Configuration
The starter supports 5 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.component.shell.autowired-enabled | 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. | true | Boolean |
camel.component.shell.banner-resource | The name of the classpath resource with the banner text, read as UTF-8, for example mybanner.txt. Only the classpath is searched: do not use a classpath: prefix or a leading slash. If the resource is not found, a WARN is logged and no banner is printed. | camel-shell-banner.txt | String |
camel.component.shell.bridge-error-handler | 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. | false | Boolean |
camel.component.shell.enabled | Whether to enable auto configuration of the shell component. This is enabled by default. | Boolean | |
camel.component.shell.show-banner | Whether to print the banner (from bannerResource, in bold yellow) to the terminal when the component starts, before the first prompt. The terminal screen is cleared at startup either way. | true | Boolean |