This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 5b62707234db Update message-history.adoc (#22498)
5b62707234db is described below
commit 5b62707234db42baca7d41198afbf2300959cdbf
Author: Andreas Jonsson <[email protected]>
AuthorDate: Wed Apr 8 21:28:53 2026 +0200
Update message-history.adoc (#22498)
Proposed solution for users having their long messages truncated in the
table.
---
.../docs/modules/eips/pages/message-history.adoc | 31 ++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-history.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-history.adoc
index f95f4b767586..b1a63430576a 100644
---
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-history.adoc
+++
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-history.adoc
@@ -348,3 +348,34 @@ for (MessageHistory history : list) {
System.out.println("Routed at id: " + history.getNode().getId());
}
----
+
+== Configuring MessageHistory format
+
+The Message History format in Camel is controlled by `Java String.format`
patterns stored as global options on the CamelContext.
+
+The defaults are defined in
https://github.com/apache/camel/blob/main/core/camel-support/src/main/java/org/apache/camel/support/MessageHelper.java[`MessageHelper.java`]:
+
+[source,java]
+----
+private static final String MESSAGE_HISTORY_HEADER = "%-40s %-30s %-50s %-12s";
+private static final String MESSAGE_HISTORY_OUTPUT = "%-40.40s %-30.30s
%-50.50s %12.12s";
+----
+
+You can customize it using `application.properties`:
+
+[source,properties]
+----
+camel.main.global-options[CamelMessageHistoryHeaderFormat] = %-40s %-30s
%-120s %-12s
+camel.main.global-options[CamelMessageHistoryOutputFormat] = %-40.40s %-30.30s
%-290.290s %12.12s
+----
+
+If you want to configure the message format for a specific exchange, you can
do it programmatically:
+
+[source,java]
+----
+camelContext.getGlobalOptions().put(Exchange.MESSAGE_HISTORY_HEADER_FORMAT,
+ "%-40s %-30s %-120s %-12s");
+
+camelContext.getGlobalOptions().put(Exchange.MESSAGE_HISTORY_OUTPUT_FORMAT,
+ "%-40.40s %-30.30s %-120.120s %12.12s");
+----