Debug
Spring Boot auto-configuration for the Camel Debugger.
This starter enables the Camel Debugger in your Spring Boot application, allowing you to set breakpoints and step through Camel routes during development. The debugger is controlled from Java, JMX or tooling, and can additionally expose a JMX RMI connector for remote tooling, which is disabled by default.
Maven coordinates
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-debug-starter</artifactId>
</dependency> Usage
Adding this starter to the classpath installs and enables the Camel Debugger. The debugger can be turned off with:
camel.debug.enabled = false JMX connector
Tooling that attaches to the debugger from another process, such as the IntelliJ IDEA and VS Code Camel plugins, uses a JMX RMI connector. The connector is disabled by default, so having this starter on the classpath never opens a listening socket on its own. Enable it explicitly when remote tooling needs to attach:
camel.debug.jmx-connector-enabled = true
camel.debug.jmx-connector-port = 1099 | The JMX RMI connector is created without authentication or transport security. Anyone able to reach the port can control the debugger, suspend routes and read message payloads. Only enable it on a trusted network, and make sure the port is bound to a loopback interface or protected by a firewall. |
The camel debug command of Camel JBang does not need this connector: it drives a Spring Boot application through the local CLI connector provided by camel-cli-connector-starter.
Spring Boot Auto-Configuration
The starter supports 15 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
camel.debug.body-include-files | Whether to include the message body of file based messages. The overhead is that the file content has to be read from the file. | true | Boolean |
camel.debug.body-include-streams | Whether to include the message body of stream based messages. If enabled then beware the stream may not be re-readable later. See more about Stream Caching. | false | Boolean |
camel.debug.body-max-chars | To limit the message body to a maximum size in the traced message. Use 0 or negative value to use unlimited size. | Integer | |
camel.debug.breakpoints | Allows to pre-configure breakpoints (node ids) to use with debugger on startup. Multiple ids can be separated by comma. Use special value all_routes to add a breakpoint for the first node for every route, in other words this makes it easy to debug from the beginning of every route without knowing the exact node ids. | String | |
camel.debug.enabled | Enables Debugger in your Camel application. | true | Boolean |
camel.debug.fallback-timeout | Fallback Timeout in seconds (300 seconds as default) when block the message processing in Camel. A timeout used for waiting for a message to arrive at a given breakpoint. | 300 | Long |
camel.debug.include-exception | Trace messages to include exception if the message failed | true | Boolean |
camel.debug.include-exchange-properties | Whether to include the exchange properties in the traced message | true | Boolean |
camel.debug.include-exchange-variables | Whether to include the exchange variables in the traced message | true | Boolean |
camel.debug.jmx-connector-enabled | Whether to create JMX connector that allows tooling to control the Camel debugger. This is what the IDEA and VSCode tooling is using. The connector opens an RMI registry and a JMX RMI server on the configured port, without authentication or transport security, so it is disabled by default and must be turned on explicitly. Only enable it on a trusted network, and bind or firewall the port accordingly. | false | Boolean |
camel.debug.jmx-connector-port | Port number to expose a JMX RMI connector for tooling that needs to control the debugger. Only in use when the JMX connector is enabled. | 1099 | Integer |
camel.debug.logging-level | The debugger logging level to use when logging activity. | info | LoggingLevel |
camel.debug.single-step-include-start-end | In single step mode, then when the exchange is created and completed, then simulate a breakpoint at start and end, that allows to suspend and watch the incoming/complete exchange at the route (you can see message body as response, failed exception etc). | false | Boolean |
camel.debug.standby | To set the debugger in standby mode, where the debugger will be installed by not automatic enabled. The debugger can then later be enabled explicit from Java, JMX or tooling. | false | Boolean |
camel.debug.wait-for-attach | Whether the debugger should suspend on startup, and wait for a remote debugger to attach. This is what the IDEA and VSCode tooling is using. | false | Boolean |