This is an automated email from the ASF dual-hosted git repository.

pcongiusti 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 021940d96e4b chore(core): mdc logic deprecated in favor of camel-mdc
021940d96e4b is described below

commit 021940d96e4b8b514349fe235382a69683944e42
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Wed Mar 11 11:29:04 2026 +0100

    chore(core): mdc logic deprecated in favor of camel-mdc
    
    Closes CAMEL-22477
---
 .../catalog/main/camel-main-configuration-metadata.json      |  4 ++--
 .../org/apache/camel/catalog/schemas/camel-spring.xsd        | 12 ++++++------
 .../camel/component/mllp/internal/TcpServerAcceptThread.java |  2 ++
 .../camel/component/mllp/internal/TcpServerBindThread.java   |  2 ++
 .../mllp/internal/TcpServerConsumerValidationRunnable.java   |  2 ++
 .../component/mllp/internal/TcpSocketConsumerRunnable.java   |  2 ++
 .../camel/component/mllp/MllpMaxConcurrentConsumersTest.java |  1 +
 .../component/mllp/MllpMutualTlsConnectionAndHeaderBase.java |  1 +
 .../mllp/MllpProducerConsumerLoopbackInOnlyTest.java         |  1 +
 .../component/mllp/MllpProducerConsumerLoopbackTest.java     |  1 +
 .../camel/component/mllp/MllpSSLContextParametersTest.java   |  1 +
 .../mllp/MllpTcpClientProducerConnectionErrorTest.java       |  1 +
 .../mllp/MllpTcpClientProducerIdleConnectionTimeoutTest.java |  1 +
 .../camel/component/mllp/MllpTcpServerCharsetTest.java       |  1 +
 .../component/mllp/MllpTcpServerConsumerBindTimeoutTest.java |  1 +
 .../mllp/MllpTcpServerConsumerMessageHeadersTest.java        |  1 +
 .../mllp/MllpTcpServerConsumerMulitpleTcpPacketTest.java     |  1 +
 .../component/mllp/MllpTcpServerConsumerThreadPoolTest.java  |  1 +
 .../component/mllp/MllpTcpServerConsumerTransactionTest.java |  1 +
 .../TcpClientProducerEndOfDataAndValidationTestSupport.java  |  1 +
 .../mllp/TcpServerConsumerAcknowledgementTestSupport.java    |  1 +
 .../TcpServerConsumerEndOfDataAndValidationTestSupport.java  |  1 +
 .../META-INF/org/apache/camel/spring/xml/camelContext.json   |  2 +-
 .../org/apache/camel/spring/xml/CamelContextFactoryBean.java |  5 +++++
 .../src/test/java/org/apache/camel/spring/SpringMDCTest.java |  1 +
 .../org/apache/camel/spring/SpringMDCTransactedTest.java     |  1 +
 .../camel/spring/SpringMDCWithBreadcrumbDisabledTest.java    |  1 +
 .../org/apache/camel/spring/SpringMDCWithBreadcrumbTest.java |  1 +
 .../interceptor/TransactionalClientDataSourceMDCTest.java    |  2 +-
 .../src/main/java/org/apache/camel/CamelContext.java         |  4 ++++
 .../src/main/java/org/apache/camel/spi/UnitOfWork.java       |  8 ++++++++
 .../org/apache/camel/impl/engine/AbstractCamelContext.java   | 10 ++++++++++
 .../apache/camel/impl/engine/BaseExecutorServiceManager.java |  2 ++
 .../java/org/apache/camel/impl/engine/DefaultUnitOfWork.java |  1 -
 .../apache/camel/impl/engine/DefaultUnitOfWorkFactory.java   |  4 ++++
 .../apache/camel/impl/engine/MDCThreadFactoryListener.java   |  1 +
 .../java/org/apache/camel/impl/engine/MDCUnitOfWork.java     |  1 +
 .../main/java/org/apache/camel/impl/engine/RouteService.java |  1 +
 .../java/org/apache/camel/processor/MulticastProcessor.java  |  4 ++++
 .../org/apache/camel/processor/OnCompletionProcessor.java    |  7 +++++++
 .../java/org/apache/camel/processor/ProcessorHelper.java     |  1 +
 .../java/org/apache/camel/processor/WireTapProcessor.java    |  2 ++
 .../camel/core/xml/AbstractCamelContextFactoryBean.java      |  5 +++++
 .../camel/core/xml/AbstractCamelContextFactoryBeanTest.java  |  1 +
 .../camel/issues/MDCUnitLoggingOutOfMemoryManualTest.java    |  1 +
 .../org/apache/camel/processor/BreadcrumbDisabledTest.java   |  1 +
 .../test/java/org/apache/camel/processor/BreadcrumbTest.java |  1 +
 .../test/java/org/apache/camel/processor/MDCAsyncTest.java   |  1 +
 .../java/org/apache/camel/processor/MDCClearingTest.java     |  1 +
 .../java/org/apache/camel/processor/MDCCustomKeysTest.java   |  1 +
 .../java/org/apache/camel/processor/MDCErrorHandlerTest.java |  1 +
 .../camel/processor/MDCOnCompletionOnCompletionTest.java     |  1 +
 .../apache/camel/processor/MDCOnCompletionParallelTest.java  |  1 +
 .../java/org/apache/camel/processor/MDCOnCompletionTest.java |  1 +
 .../processor/MDCResetMidRouteProducerTemplateTest.java      |  1 +
 .../test/java/org/apache/camel/processor/MDCResetTest.java   |  1 +
 .../java/org/apache/camel/processor/MDCRouteIdAwareTest.java |  1 +
 .../camel/processor/MDCSplitParallelProcessingTest.java      |  1 +
 .../test/java/org/apache/camel/processor/MDCSplitTest.java   |  1 +
 .../src/test/java/org/apache/camel/processor/MDCTest.java    |  1 +
 .../org/apache/camel/processor/MDCWireTapCustomKeysTest.java |  1 +
 .../test/java/org/apache/camel/processor/MDCWireTapTest.java |  1 +
 .../org/apache/camel/processor/MDCWithBreadcrumbTest.java    |  1 +
 .../processor/SplitSubUnitOfWorkWithMDCLoggingTest.java      |  1 +
 .../test/java/org/apache/camel/processor/WireTapMDCTest.java |  1 +
 .../camel/processor/aggregator/AbstractDistributedTest.java  |  1 +
 .../java/org/apache/camel/processor/async/AsyncMDCTest.java  |  1 +
 .../META-INF/camel-main-configuration-metadata.json          |  4 ++--
 core/camel-main/src/main/docs/main.adoc                      |  4 ++--
 .../apache/camel/main/DefaultConfigurationConfigurer.java    |  3 +++
 .../apache/camel/main/DefaultConfigurationProperties.java    | 12 +++++++++++-
 .../camel/api/management/mbean/ManagedCamelContextMBean.java |  1 +
 .../apache/camel/management/mbean/ManagedCamelContext.java   |  1 +
 .../modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc      |  5 +++++
 docs/user-manual/modules/ROOT/pages/mdc.adoc                 |  2 +-
 proposals/mdc.adoc                                           |  8 ++++++--
 76 files changed, 149 insertions(+), 19 deletions(-)

diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 89b92a71e735..878f38c171b2 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -101,7 +101,7 @@
     { "name": "camel.main.logName", "required": false, "description": "The 
global name to use for Log EIP The name is default the routeId or the 
source:line if source location is enabled. You can also specify the name using 
tokens: ${class} - the logger class name 
(org.apache.camel.processor.LogProcessor) ${contextId} - the camel context id 
${routeId} - the route id ${groupId} - the route group id ${nodeId} - the node 
id ${nodePrefixId} - the node prefix id ${source} - the source:line (s [...]
     { "name": "camel.main.mainListenerClasses", "required": false, 
"description": "Sets classes names that will be used for MainListener that 
makes it possible to do custom logic during starting and stopping camel-main.", 
"sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "secret": false },
     { "name": "camel.main.mainListeners", "required": false, "description": 
"Sets main listener objects that will be used for MainListener that makes it 
possible to do custom logic during starting and stopping camel-main.", 
"sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": 
"array", "javaType": "java.util.List", "secret": false },
-    { "name": "camel.main.mdcLoggingKeysPattern", "required": false, 
"description": "Sets the pattern used for determine which custom MDC keys to 
propagate during message routing when the routing engine continues routing 
asynchronously for the given message. Setting this pattern to will propagate 
all custom keys. Or setting the pattern to foo,bar will propagate any keys 
starting with either foo or bar. Notice that a set of standard Camel MDC keys 
are always propagated which starts with c [...]
+    { "name": "camel.main.mdcLoggingKeysPattern", "required": false, 
"description": "Sets the pattern used for determine which custom MDC keys to 
propagate during message routing when the routing engine continues routing 
asynchronously for the given message. Setting this pattern to will propagate 
all custom keys. Or setting the pattern to foo,bar will propagate any keys 
starting with either foo or bar. Notice that a set of standard Camel MDC keys 
are always propagated which starts with c [...]
     { "name": "camel.main.messageHistory", "required": false, "description": 
"Sets whether message history is enabled or not. Default is false.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.modeline", "required": false, "description": 
"Whether to support JBang style \/\/DEPS to specify additional dependencies 
when running Camel JBang", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.name", "required": false, "description": "Sets the 
name of the CamelContext.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
@@ -157,7 +157,7 @@
     { "name": "camel.main.typeConverterStatisticsEnabled", "required": false, 
"description": "Sets whether type converter statistics is enabled. By default 
the type converter utilization statistics is disabled. Notice: If enabled then 
there is a slight performance impact under very heavy load.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.useBreadcrumb", "required": false, "description": 
"Set whether breadcrumb is enabled. The default value is false.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.useDataType", "required": false, "description": 
"Whether to enable using data type on Camel messages. Data type are automatic 
turned on if one ore more routes has been explicit configured with input and 
output types. Otherwise data type is default off.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
-    { "name": "camel.main.useMdcLogging", "required": false, "description": 
"To turn on MDC logging", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
+    { "name": "camel.main.useMdcLogging", "required": false, "description": 
"To turn on MDC logging (deprecated, use camel-mdc component instead)", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false, 
"deprecated": true },
     { "name": "camel.main.uuidGenerator", "required": false, "description": 
"UUID generator to use. default (32 bytes), short (16 bytes), classic (32 bytes 
or longer), simple (long incrementing counter), off (turned off for exchanges - 
only intended for performance profiling)", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "enum", 
"javaType": "java.lang.String", "defaultValue": "default", "secret": false, 
"enum": [ "classic", "default", "short", "simple",  [...]
     { "name": "camel.main.virtualThreadsEnabled", "required": false, 
"description": "Whether to enable virtual threads when creating thread pools. 
When enabled, Camel will use virtual threads instead of platform threads for 
its thread pools. This can also be enabled via the JVM system property {code 
camel.threads.virtual.enabled=true} . This option must be read early during 
bootstrap, so it is set as a system property before thread pools are created.", 
"sourceType": "org.apache.camel.mai [...]
     { "name": "camel.debug.bodyIncludeFiles", "required": false, 
"description": "Whether to include the message body of file based messages. The 
overhead is that the file content has to be read from the file.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true, "secret": false },
diff --git 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
index 5b7f7fd8ba57..668cc3f5c349 100644
--- 
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
+++ 
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd
@@ -17747,12 +17747,12 @@ Set whether MDC is enabled.
           <xs:annotation>
             <xs:documentation xml:lang="en">
 <![CDATA[
-Sets the pattern used for determine which custom MDC keys to propagate during 
message routing when the routing engine
-continues routing asynchronously for the given message. Setting this pattern 
to will propagate all custom keys. Or
-setting the pattern to foo,bar will propagate any keys starting with either 
foo or bar. Notice that a set of standard
-Camel MDC keys are always propagated which starts with camel. as key name. The 
match rules are applied in this order
-(case insensitive): 1. exact match, returns true 2. wildcard match (pattern 
ends with a and the name starts with the
-pattern), returns true 3. regular expression match, returns true 4. otherwise 
returns false.
+Deprecated: Sets the pattern used for determine which custom MDC keys to 
propagate during message routing when the
+routing engine continues routing asynchronously for the given message. Setting 
this pattern to will propagate all custom
+keys. Or setting the pattern to foo,bar will propagate any keys starting with 
either foo or bar. Notice that a set of
+standard Camel MDC keys are always propagated which starts with camel. as key 
name. The match rules are applied in this
+order (case insensitive): 1. exact match, returns true 2. wildcard match 
(pattern ends with a and the name starts with
+the pattern), returns true 3. regular expression match, returns true 4. 
otherwise returns false.
 ]]>
             </xs:documentation>
           </xs:annotation>
diff --git 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerAcceptThread.java
 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerAcceptThread.java
index 29cbb35dbc6d..a61dfbb2a73d 100644
--- 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerAcceptThread.java
+++ 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerAcceptThread.java
@@ -72,6 +72,8 @@ public class TcpServerAcceptThread extends Thread {
      * is a load-balancer probe. The test is done before the 
ConsumerClientSocketThread is created to avoid creating a
      * large number of short lived threads, which is what can occur if the 
load balancer polling interval is very short.
      */
+    @SuppressWarnings("deprecation")
+    // MDC deprecated since 4.19.0, use camel-mdc instead
     @Override
     public void run() {
         running = true;
diff --git 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerBindThread.java
 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerBindThread.java
index 8c676ae6dcd9..0dc572f9f081 100644
--- 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerBindThread.java
+++ 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerBindThread.java
@@ -61,6 +61,8 @@ public class TcpServerBindThread extends Thread {
      * Bind the TCP ServerSocket within the specified timeout.
      */
     @Override
+    @SuppressWarnings("deprecation")
+    // MDC deprecated since 4.19.0, use camel-mdc instead
     public void run() {
         MDC.put(UnitOfWork.MDC_CAMEL_CONTEXT_ID, 
consumer.getEndpoint().getCamelContext().getName());
 
diff --git 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerConsumerValidationRunnable.java
 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerConsumerValidationRunnable.java
index 79edeff9a175..b1d7a6821071 100644
--- 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerConsumerValidationRunnable.java
+++ 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpServerConsumerValidationRunnable.java
@@ -115,6 +115,8 @@ public class TcpServerConsumerValidationRunnable implements 
Runnable {
      * Do the initial read on the Socket and try to determine if it has HL7 
data, junk, or nothing.
      */
     @Override
+    @SuppressWarnings("deprecation")
+    // MDC deprecated since 4.19.0, use camel-mdc instead
     public void run() {
         String originalThreadName = Thread.currentThread().getName();
         Thread.currentThread().setName(createThreadName());
diff --git 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpSocketConsumerRunnable.java
 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpSocketConsumerRunnable.java
index f8c6da04cd7a..66b2df1b5ebc 100644
--- 
a/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpSocketConsumerRunnable.java
+++ 
b/components/camel-mllp/src/main/java/org/apache/camel/component/mllp/internal/TcpSocketConsumerRunnable.java
@@ -117,6 +117,8 @@ public class TcpSocketConsumerRunnable implements Runnable {
     }
 
     @Override
+    @SuppressWarnings("deprecation")
+    // MDC deprecated since 4.19.0, use camel-mdc instead
     public void run() {
         running = true;
         String originalThreadName = Thread.currentThread().getName();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMaxConcurrentConsumersTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMaxConcurrentConsumersTest.java
index ae8edbbb5b88..725293401f32 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMaxConcurrentConsumersTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMaxConcurrentConsumersTest.java
@@ -61,6 +61,7 @@ public class MllpMaxConcurrentConsumersTest extends 
CamelTestSupport {
         mllpClient2.setMllpPort(AvailablePortFinder.getNextAvailable());
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMutualTlsConnectionAndHeaderBase.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMutualTlsConnectionAndHeaderBase.java
index 3f31392bdf13..b829c388a606 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMutualTlsConnectionAndHeaderBase.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpMutualTlsConnectionAndHeaderBase.java
@@ -173,6 +173,7 @@ public class MllpMutualTlsConnectionAndHeaderBase extends 
CamelTestSupport {
      * @return           camelContext.
      * @throws Exception if anything goes wrong and then should fail the test.
      */
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         mllpClient.setMllpHost("localhost");
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackInOnlyTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackInOnlyTest.java
index 36b3c609a2d6..52510ea0f269 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackInOnlyTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackInOnlyTest.java
@@ -40,6 +40,7 @@ public class MllpProducerConsumerLoopbackInOnlyTest extends 
CamelTestSupport {
     @EndpointInject("mock://received-and-processed")
     MockEndpoint receivedAndProcessed;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackTest.java
index f8f351517b2c..891658426070 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpProducerConsumerLoopbackTest.java
@@ -56,6 +56,7 @@ public class MllpProducerConsumerLoopbackTest extends 
CamelTestSupport {
                 "Skipping test running in CI server - Fails sometimes on CI 
server with address already in use");
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpSSLContextParametersTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpSSLContextParametersTest.java
index 14be89b73a4a..bdaef687060f 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpSSLContextParametersTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpSSLContextParametersTest.java
@@ -57,6 +57,7 @@ public class MllpSSLContextParametersTest extends 
CamelTestSupport {
         return sslContextParameters;
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         mllpClient.setMllpHost("localhost");
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerConnectionErrorTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerConnectionErrorTest.java
index 77fc3c884c59..f2e4ff16a814 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerConnectionErrorTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerConnectionErrorTest.java
@@ -62,6 +62,7 @@ public class MllpTcpClientProducerConnectionErrorTest extends 
CamelTestSupport {
     @EndpointInject("mock://acknowledgement-ex")
     MockEndpoint acknowledgementEx;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerIdleConnectionTimeoutTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerIdleConnectionTimeoutTest.java
index 74852c8cfa01..488a5111cb0b 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerIdleConnectionTimeoutTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpClientProducerIdleConnectionTimeoutTest.java
@@ -64,6 +64,7 @@ public class MllpTcpClientProducerIdleConnectionTimeoutTest 
extends CamelTestSup
     @EndpointInject("mock://receive-ex")
     MockEndpoint receiveEx;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerCharsetTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerCharsetTest.java
index aa5c88ff68d2..c8ce20bef5c0 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerCharsetTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerCharsetTest.java
@@ -55,6 +55,7 @@ public class MllpTcpServerCharsetTest extends 
CamelTestSupport {
     @EndpointInject(TARGET_URI)
     MockEndpoint target;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         mllpClient.setMllpHost("localhost");
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerBindTimeoutTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerBindTimeoutTest.java
index c6339dacd222..78ff7bd8bb0d 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerBindTimeoutTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerBindTimeoutTest.java
@@ -46,6 +46,7 @@ public class MllpTcpServerConsumerBindTimeoutTest extends 
CamelTestSupport {
         return true;
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageHeadersTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageHeadersTest.java
index 2833db476fff..7afaabc1fc50 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageHeadersTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMessageHeadersTest.java
@@ -56,6 +56,7 @@ public class MllpTcpServerConsumerMessageHeadersTest extends 
CamelTestSupport {
         mllpClient.setMllpPort(AvailablePortFinder.getNextAvailable());
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMulitpleTcpPacketTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMulitpleTcpPacketTest.java
index 0c941baaabe9..23fa0cabfcfd 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMulitpleTcpPacketTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerMulitpleTcpPacketTest.java
@@ -42,6 +42,7 @@ public class MllpTcpServerConsumerMulitpleTcpPacketTest 
extends CamelTestSupport
     @EndpointInject("mock://result")
     MockEndpoint result;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerThreadPoolTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerThreadPoolTest.java
index 06af74a57cdc..24e939b8a572 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerThreadPoolTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerThreadPoolTest.java
@@ -71,6 +71,7 @@ public class MllpTcpServerConsumerThreadPoolTest extends 
CamelTestSupport {
         mllpPort = AvailablePortFinder.getNextAvailable();
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java
index d8c60f2fff80..33459788cac4 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/MllpTcpServerConsumerTransactionTest.java
@@ -55,6 +55,7 @@ public class MllpTcpServerConsumerTransactionTest extends 
CamelTestSupport {
     @EndpointInject("mock://on-failure-only")
     MockEndpoint failure;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpClientProducerEndOfDataAndValidationTestSupport.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpClientProducerEndOfDataAndValidationTestSupport.java
index 6dcafd2d0c89..e5deb6575abf 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpClientProducerEndOfDataAndValidationTestSupport.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpClientProducerEndOfDataAndValidationTestSupport.java
@@ -107,6 +107,7 @@ public abstract class 
TcpClientProducerEndOfDataAndValidationTestSupport extends
 
     abstract boolean validatePayload();
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerAcknowledgementTestSupport.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerAcknowledgementTestSupport.java
index 0aa9515eada2..9cab30ff6b7d 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerAcknowledgementTestSupport.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerAcknowledgementTestSupport.java
@@ -68,6 +68,7 @@ public abstract class 
TcpServerConsumerAcknowledgementTestSupport extends CamelT
         ackGenerationEx.expectedMessageCount(0);
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerEndOfDataAndValidationTestSupport.java
 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerEndOfDataAndValidationTestSupport.java
index 5616df00e63e..d05258a5cd32 100644
--- 
a/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerEndOfDataAndValidationTestSupport.java
+++ 
b/components/camel-mllp/src/test/java/org/apache/camel/component/mllp/TcpServerConsumerEndOfDataAndValidationTestSupport.java
@@ -69,6 +69,7 @@ public abstract class 
TcpServerConsumerEndOfDataAndValidationTestSupport extends
     int expectedFailedCount;
     int expectedInvalidCount;
 
+    @SuppressWarnings("deprecation")
     @Override
     protected CamelContext createCamelContext() throws Exception {
         DefaultCamelContext context = (DefaultCamelContext) 
super.createCamelContext();
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json
 
b/components/camel-spring-parent/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json
index 0ac018906cb5..306da100f24d 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json
@@ -31,7 +31,7 @@
     "shutdownEager": { "index": 16, "kind": "attribute", "displayName": 
"Shutdown Eager", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": "true", "description": "Whether to shutdown 
CamelContext eager when Spring is shutting down. This ensure a cleaner shutdown 
of Camel, as dependent bean's are not shutdown at this moment. The bean's will 
then be shutdown after camelContext." },
     "dumpRoutes": { "index": 17, "kind": "attribute", "displayName": "Dump 
Routes", "group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": "false", "description": "If dumping is enabled then Camel will 
during startup dump all loaded routes (incl rests and route templates) 
represented as XML DSL into the log. This is intended for trouble shooting or 
to assist during development. Sens [...]
     "useMDCLogging": { "index": 18, "kind": "attribute", "displayName": "Use 
MDC Logging", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Set whether MDC is enabled." },
-    "mdcLoggingKeysPattern": { "index": 19, "kind": "attribute", 
"displayName": "MDC Logging Keys Pattern", "group": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "description": "Sets the pattern used for 
determine which custom MDC keys to propagate during message routing when the 
routing engine continues routing asynchronously for the given message. Setting 
this pattern to will propagate all custo [...]
+    "mdcLoggingKeysPattern": { "index": 19, "kind": "attribute", 
"displayName": "MDC Logging Keys Pattern", "group": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": true, 
"autowired": false, "secret": false, "description": "Sets the pattern used for 
determine which custom MDC keys to propagate during message routing when the 
routing engine continues routing asynchronously for the given message. Setting 
this pattern to will propagate all custom [...]
     "useDataType": { "index": 20, "kind": "attribute", "displayName": "Use 
Data Type", "group": "common", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"description": "Whether to enable using data type on Camel messages. Data type 
are automatic turned on if: one ore more routes has been explicit configured 
with input and output types when using rest-dsl with binding turned on 
Otherwise data type is default off." },
     "useBreadcrumb": { "index": 21, "kind": "attribute", "displayName": "Use 
Breadcrumb", "group": "common", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Set whether breadcrumb is enabled." },
     "beanPostProcessorEnabled": { "index": 22, "kind": "attribute", 
"displayName": "Bean Post Processor Enabled", "group": "common", "required": 
false, "type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "true", "description": 
"Can be used to turn off bean post processing. Be careful to turn this off, as 
this means that beans that use Camel annotations such as 
org.apache.camel.EndpointInject , org.apache.camel.Produc [...]
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
 
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
index 6e334a976512..d4f44634df35 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java
@@ -153,6 +153,7 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
     private String useMDCLogging;
     @XmlAttribute
     @Metadata(displayName = "MDC Logging Keys Pattern")
+    @Deprecated(since = "4.19.0")
     private String mdcLoggingKeysPattern;
     @XmlAttribute
     private String useDataType;
@@ -1015,6 +1016,7 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
     }
 
     @Override
+    @Deprecated(since = "4.19.0")
     public String getUseMDCLogging() {
         return useMDCLogging;
     }
@@ -1022,10 +1024,12 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
     /**
      * Set whether <a 
href="http://www.slf4j.org/api/org/slf4j/MDC.html";>MDC</a> is enabled.
      */
+    @Deprecated(since = "4.19.0")
     public void setUseMDCLogging(String useMDCLogging) {
         this.useMDCLogging = useMDCLogging;
     }
 
+    @Deprecated(since = "4.19.0")
     public String getMDCLoggingKeysPattern() {
         return mdcLoggingKeysPattern;
     }
@@ -1041,6 +1045,7 @@ public class CamelContextFactoryBean extends 
AbstractCamelContextFactoryBean<Spr
      * 1. exact match, returns true 2. wildcard match (pattern ends with a * 
and the name starts with the pattern),
      * returns true 3. regular expression match, returns true 4. otherwise 
returns false
      */
+    @Deprecated(since = "4.19.0")
     public void setMDCLoggingKeysPattern(String mdcLoggingKeysPattern) {
         this.mdcLoggingKeysPattern = mdcLoggingKeysPattern;
     }
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTest.java
 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTest.java
index 73f2155dd0f5..4ccbabd8a4ce 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTest.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTest.java
@@ -26,6 +26,7 @@ import 
org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class SpringMDCTest extends SpringTestSupport {
 
     @Override
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
index 290260e4f7e9..a0e71aa08289 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCTransactedTest.java
@@ -27,6 +27,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class SpringMDCTransactedTest extends CamelTestSupport {
 
     @Override
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbDisabledTest.java
 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbDisabledTest.java
index a33bb90b0403..570085918403 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbDisabledTest.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbDisabledTest.java
@@ -25,6 +25,7 @@ import 
org.springframework.context.support.ClassPathXmlApplicationContext;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
+@Deprecated(since = "4.19.0")
 public class SpringMDCWithBreadcrumbDisabledTest extends SpringMDCTest {
 
     @Override
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbTest.java
 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbTest.java
index 13826d05fba8..08c95bb0be56 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbTest.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/SpringMDCWithBreadcrumbTest.java
@@ -24,6 +24,7 @@ import 
org.springframework.context.support.ClassPathXmlApplicationContext;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class SpringMDCWithBreadcrumbTest extends SpringMDCTest {
 
     @Override
diff --git 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMDCTest.java
 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMDCTest.java
index 92a17585c682..b2ef4053c601 100644
--- 
a/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMDCTest.java
+++ 
b/components/camel-spring-parent/camel-spring-xml/src/test/java/org/apache/camel/spring/interceptor/TransactionalClientDataSourceMDCTest.java
@@ -28,11 +28,11 @@ import static 
org.junit.jupiter.api.Assertions.assertNotNull;
 /**
  * Easier transaction configuration as we do not have to setup a transaction 
error handler
  */
+@Deprecated(since = "4.19.0")
 public class TransactionalClientDataSourceMDCTest extends 
TransactionalClientDataSourceTest {
 
     @Override
     // The API is deprecated, we can remove warnings safely as the tests will 
disappear when removing this component.
-    @SuppressWarnings("deprecation")
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new SpringRouteBuilder() {
             public void configure() throws Exception {
diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java 
b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
index e5921b3d2141..fcf36be190b1 100644
--- a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
+++ b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java
@@ -1518,6 +1518,7 @@ public interface CamelContext extends 
CamelContextLifecycle, RuntimeConfiguratio
      *
      * @return <tt>true</tt> if MDC logging is enabled
      */
+    @Deprecated(since = "4.19.0")
     Boolean isUseMDCLogging();
 
     /**
@@ -1525,6 +1526,7 @@ public interface CamelContext extends 
CamelContextLifecycle, RuntimeConfiguratio
      *
      * @param useMDCLogging <tt>true</tt> to enable MDC logging, 
<tt>false</tt> to disable
      */
+    @Deprecated(since = "4.19.0")
     void setUseMDCLogging(Boolean useMDCLogging);
 
     /**
@@ -1542,6 +1544,7 @@ public interface CamelContext extends 
CamelContextLifecycle, RuntimeConfiguratio
      * <li>otherwise returns false</li>
      * </ul>
      */
+    @Deprecated(since = "4.19.0")
     String getMDCLoggingKeysPattern();
 
     /**
@@ -1561,6 +1564,7 @@ public interface CamelContext extends 
CamelContextLifecycle, RuntimeConfiguratio
      *
      * @param pattern the pattern
      */
+    @Deprecated(since = "4.19.0")
     void setMDCLoggingKeysPattern(String pattern);
 
     /**
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java 
b/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
index 75b5de4cd2a9..d0c45e97fbd2 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/UnitOfWork.java
@@ -30,13 +30,21 @@ import org.apache.camel.Route;
  */
 public interface UnitOfWork {
 
+    @Deprecated(since = "4.19.0")
     String MDC_BREADCRUMB_ID = "camel.breadcrumbId";
+    @Deprecated(since = "4.19.0")
     String MDC_EXCHANGE_ID = "camel.exchangeId";
+    @Deprecated(since = "4.19.0")
     String MDC_MESSAGE_ID = "camel.messageId";
+    @Deprecated(since = "4.19.0")
     String MDC_CORRELATION_ID = "camel.correlationId";
+    @Deprecated(since = "4.19.0")
     String MDC_ROUTE_ID = "camel.routeId";
+    @Deprecated(since = "4.19.0")
     String MDC_STEP_ID = "camel.stepId";
+    @Deprecated(since = "4.19.0")
     String MDC_CAMEL_CONTEXT_ID = "camel.contextId";
+    @Deprecated(since = "4.19.0")
     String MDC_TRANSACTION_KEY = "camel.transactionKey";
 
     /**
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
index 888f62cd5dcc..c4be7d561d7f 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/AbstractCamelContext.java
@@ -283,7 +283,9 @@ public abstract class AbstractCamelContext extends 
BaseService
     private Boolean sourceLocationEnabled = Boolean.FALSE;
     private Boolean typeConverterStatisticsEnabled = Boolean.FALSE;
     private String dumpRoutes;
+    @Deprecated(since = "4.19.0")
     private Boolean useMDCLogging = Boolean.FALSE;
+    @Deprecated(since = "4.19.0")
     private String mdcLoggingKeysPattern;
     private Boolean useDataType = Boolean.FALSE;
     private Boolean useBreadcrumb = Boolean.FALSE;
@@ -2984,6 +2986,7 @@ public abstract class AbstractCamelContext extends 
BaseService
             LOG.info("Tracing is enabled on CamelContext: {}", 
camelContextExtension.getName());
         }
         if (isUseMDCLogging()) {
+            LOG.info("Tracing is enabled on CamelContext: {}", 
camelContextExtension.getName());
             // log if MDC has been enabled
             String pattern = getMDCLoggingKeysPattern();
             if (pattern != null) {
@@ -2992,6 +2995,8 @@ public abstract class AbstractCamelContext extends 
BaseService
             } else {
                 LOG.info("MDC logging is enabled on CamelContext: {}", 
camelContextExtension.getName());
             }
+            LOG.warn("The MDC core logging is deprecated and may be removed in 
future versions. " +
+                     "Please, use camel-mdc component instead.");
         }
         if (getDelayer() != null && getDelayer() > 0) {
             LOG.info("Delayer is enabled with: {} ms. on CamelContext: {}", 
getDelayer(), camelContextExtension.getName());
@@ -3978,21 +3983,25 @@ public abstract class AbstractCamelContext extends 
BaseService
         this.dumpRoutes = dumpRoutes;
     }
 
+    @Deprecated(since = "4.19.0")
     @Override
     public Boolean isUseMDCLogging() {
         return useMDCLogging != null && useMDCLogging;
     }
 
+    @Deprecated(since = "4.19.0")
     @Override
     public void setUseMDCLogging(Boolean useMDCLogging) {
         this.useMDCLogging = useMDCLogging;
     }
 
+    @Deprecated(since = "4.19.0")
     @Override
     public String getMDCLoggingKeysPattern() {
         return mdcLoggingKeysPattern;
     }
 
+    @Deprecated(since = "4.19.0")
     @Override
     public void setMDCLoggingKeysPattern(String pattern) {
         this.mdcLoggingKeysPattern = pattern;
@@ -4594,6 +4603,7 @@ public abstract class AbstractCamelContext extends 
BaseService
         return status;
     }
 
+    @Deprecated(since = "4.19.0")
     class LifecycleHelper implements AutoCloseable {
         final Map<String, String> originalContextMap;
         final ClassLoader tccl;
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
index 58a14151de1b..3d92f70f8707 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/BaseExecutorServiceManager.java
@@ -468,6 +468,7 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
                 
ThreadFactoryListener.class).ifPresent(this::addThreadFactoryListener);
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     protected void doStart() throws Exception {
         super.doStart();
@@ -481,6 +482,7 @@ public class BaseExecutorServiceManager extends 
ServiceSupport implements Execut
         }
 
         // enrich threads for MDC logging
+        // Deprecated since 4.19.0
         boolean usedMDCLogging = getCamelContext().isUseMDCLogging() != null 
&& getCamelContext().isUseMDCLogging();
         if (usedMDCLogging) {
             threadFactoryListeners.add(new MDCThreadFactoryListener());
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
index 2201f3dc2294..3250798c5a99 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWork.java
@@ -51,7 +51,6 @@ import org.slf4j.LoggerFactory;
 public class DefaultUnitOfWork implements UnitOfWork {
     private static final Logger LOG = 
LoggerFactory.getLogger(DefaultUnitOfWork.class);
 
-    // instances used by MDCUnitOfWork
     final InflightRepository inflightRepository;
     final StreamCachingStrategy streamCachingStrategy;
     final boolean allowUseOriginalMessage;
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWorkFactory.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWorkFactory.java
index dd91419a4738..23e873b77326 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWorkFactory.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/DefaultUnitOfWorkFactory.java
@@ -28,15 +28,19 @@ import org.apache.camel.spi.UnitOfWorkFactory;
 public class DefaultUnitOfWorkFactory implements UnitOfWorkFactory {
 
     private InflightRepository inflightRepository;
+    @Deprecated(since = "4.19.0")
     private boolean usedMDCLogging;
+    @Deprecated(since = "4.19.0")
     private String mdcLoggingKeysPattern;
     private boolean allowUseOriginalMessage;
     private boolean useBreadcrumb;
 
+    @SuppressWarnings("deprecation")
     @Override
     public UnitOfWork createUnitOfWork(Exchange exchange) {
         UnitOfWork answer;
         if (usedMDCLogging) {
+            // Deprecated since 4.19.0
             answer = new MDCUnitOfWork(
                     exchange, inflightRepository, mdcLoggingKeysPattern, 
allowUseOriginalMessage, useBreadcrumb);
         } else {
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCThreadFactoryListener.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCThreadFactoryListener.java
index b4a44d54fa45..df1312173999 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCThreadFactoryListener.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCThreadFactoryListener.java
@@ -30,6 +30,7 @@ import org.slf4j.MDC;
  * information earlier such as from the internal work that a consumer performs 
before routing
  * {@link org.apache.camel.Exchange} where the {@link MDCUnitOfWork} would 
include this information.
  */
+@Deprecated(since = "4.19.0")
 public class MDCThreadFactoryListener implements 
ExecutorServiceManager.ThreadFactoryListener {
 
     @Override
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCUnitOfWork.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCUnitOfWork.java
index d2cdffc6cb46..b07584ec00d6 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCUnitOfWork.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/MDCUnitOfWork.java
@@ -35,6 +35,7 @@ import org.slf4j.MDC;
 /**
  * This unit of work supports <a 
href="http://www.slf4j.org/api/org/slf4j/MDC.html";>MDC</a>.
  */
+@Deprecated(since = "4.19.0")
 public class MDCUnitOfWork extends DefaultUnitOfWork implements Service {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(MDCUnitOfWork.class);
diff --git 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/RouteService.java
 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/RouteService.java
index 72c488761794..84909fada5a4 100644
--- 
a/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/RouteService.java
+++ 
b/core/camel-base-engine/src/main/java/org/apache/camel/impl/engine/RouteService.java
@@ -490,6 +490,7 @@ public class RouteService extends ChildServiceSupport {
         }
     }
 
+    @Deprecated(since = "4.19.0")
     class MDCHelper implements AutoCloseable {
         final Map<String, String> originalContextMap;
 
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
index 1066873a6331..e4fc297d8566 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/MulticastProcessor.java
@@ -383,6 +383,7 @@ public class MulticastProcessor extends BaseProcessorSupport
 
     protected void schedule(final Runnable runnable, boolean transacted) {
         if (isParallelProcessing()) {
+            @SuppressWarnings("deprecation")
             Runnable task = prepareMDCParallelTask(camelContext, runnable);
             try {
                 executorService.submit(() -> 
reactiveExecutor.scheduleSync(task));
@@ -411,9 +412,11 @@ public class MulticastProcessor extends 
BaseProcessorSupport
         final AtomicInteger nbAggregated = new AtomicInteger();
         final AtomicBoolean allSent = new AtomicBoolean();
         final AtomicBoolean done = new AtomicBoolean();
+        @Deprecated(since = "4.19.0")
         final Map<String, String> mdc;
         final ScheduledFuture<?> timeoutTask;
 
+        @SuppressWarnings("deprecation")
         MulticastTask(Exchange original, Iterable<ProcessorExchangePair> 
pairs, AsyncCallback callback, int capacity,
                       boolean transacted) {
             this.original = original;
@@ -428,6 +431,7 @@ public class MulticastProcessor extends BaseProcessorSupport
             // if MDC is enabled we must make a copy in this constructor when 
the task
             // is created by the caller thread, and then propagate back when 
run is called
             // which can happen from another thread
+            // Deprecated since 4.19.0
             if (isParallelProcessing() && 
original.getContext().isUseMDCLogging()) {
                 this.mdc = MDC.getCopyOfContextMap();
             } else {
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
index f544f240bcdb..38faece9f1df 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/OnCompletionProcessor.java
@@ -215,6 +215,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
      * @param  exchange the current exchange
      * @return          the exchange to be routed in onComplete
      */
+    @SuppressWarnings("deprecation")
     protected Exchange prepareExchange(Exchange exchange) {
         Exchange answer;
 
@@ -288,6 +289,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
             };
         }
 
+        @SuppressWarnings("deprecation")
         @Override
         public void onComplete(final Exchange exchange) {
             if (shouldSkip(exchange, onFailureOnly)) {
@@ -302,6 +304,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
                     LOG.debug("Processing onComplete: {}", copy);
                     doProcess(processor, copy);
                 };
+                // Deprecated since 4.19.0
                 task = prepareMDCParallelTask(camelContext, task);
                 executorService.submit(task);
             } else {
@@ -311,6 +314,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
             }
         }
 
+        @SuppressWarnings("deprecation")
         @Override
         public void onFailure(final Exchange exchange) {
             if (shouldSkip(exchange, onCompleteOnly)) {
@@ -333,6 +337,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
                     // restore exception after processing
                     copy.setException(original);
                 };
+                // Deprecated since 4.19.0
                 task = prepareMDCParallelTask(camelContext, task);
                 executorService.submit(task);
             } else {
@@ -427,6 +432,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
                     // NO-OP
                 }
 
+                @SuppressWarnings("deprecation")
                 @Override
                 public void onAfterRoute(Route route, Exchange exchange) {
                     LOG.debug("onAfterRoute from Route {}", 
route.getRouteId());
@@ -461,6 +467,7 @@ public class OnCompletionProcessor extends 
BaseProcessorSupport implements Trace
                             LOG.debug("Processing onAfterRoute: {}", copy);
                             doProcess(processor, copy);
                         };
+                        // Deprecated since 4.19.0
                         task = prepareMDCParallelTask(camelContext, task);
                         executorService.submit(task);
                     } else {
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/ProcessorHelper.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/ProcessorHelper.java
index 45e57e53fca3..2767cca7d38e 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/ProcessorHelper.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/ProcessorHelper.java
@@ -75,6 +75,7 @@ final class ProcessorHelper {
         return null;
     }
 
+    @Deprecated(since = "4.19.0")
     static Runnable prepareMDCParallelTask(CamelContext camelContext, Runnable 
runnable) {
         Runnable answer = runnable;
 
diff --git 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
index 59a18a5976ae..34cc7b915678 100644
--- 
a/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
+++ 
b/core/camel-core-processor/src/main/java/org/apache/camel/processor/WireTapProcessor.java
@@ -179,6 +179,7 @@ public class WireTapProcessor extends BaseProcessorSupport
         }
     }
 
+    @SuppressWarnings("deprecation")
     @Override
     public boolean process(final Exchange exchange, final AsyncCallback 
callback) {
         if (!isStarted()) {
@@ -199,6 +200,7 @@ public class WireTapProcessor extends BaseProcessorSupport
         try {
             // create task which has state used during routing
             Runnable task = taskFactory.acquire(target, null);
+            // Deprecated since 4.19.0
             task = ProcessorHelper.prepareMDCParallelTask(camelContext, task);
             executorService.submit(task);
         } catch (Exception e) {
diff --git 
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
 
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
index 666c5d14de10..55e8c1125e57 100644
--- 
a/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
+++ 
b/core/camel-core-xml/src/main/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBean.java
@@ -1187,8 +1187,10 @@ public abstract class AbstractCamelContextFactoryBean<T 
extends ModelCamelContex
 
     public abstract String getAutoStartup();
 
+    @Deprecated(since = "4.19.0")
     public abstract String getUseMDCLogging();
 
+    @Deprecated(since = "4.19.0")
     public abstract String getMDCLoggingKeysPattern();
 
     public abstract String getDumpRoutes();
@@ -1280,6 +1282,7 @@ public abstract class AbstractCamelContextFactoryBean<T 
extends ModelCamelContex
      * @param  context   the context
      * @throws Exception is thrown if error occurred
      */
+    @SuppressWarnings("deprecation")
     protected void initCamelContext(T context) throws Exception {
         if (getStartupSummaryLevel() != null) {
             context.setStartupSummaryLevel(getStartupSummaryLevel());
@@ -1335,9 +1338,11 @@ public abstract class AbstractCamelContextFactoryBean<T 
extends ModelCamelContex
         if (getAutoStartup() != null) {
             context.setAutoStartup(CamelContextHelper.parseBoolean(context, 
getAutoStartup()));
         }
+        // Deprecated in 4.19.0
         if (getUseMDCLogging() != null) {
             context.setUseMDCLogging(CamelContextHelper.parseBoolean(context, 
getUseMDCLogging()));
         }
+        // Deprecated in 4.19.0
         if (getMDCLoggingKeysPattern() != null) {
             
context.setMDCLoggingKeysPattern(CamelContextHelper.parseText(context, 
getMDCLoggingKeysPattern()));
         }
diff --git 
a/core/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
 
b/core/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
index 9cbe70da6db7..b2ae8c810be4 100644
--- 
a/core/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
+++ 
b/core/camel-core-xml/src/test/java/org/apache/camel/core/xml/AbstractCamelContextFactoryBeanTest.java
@@ -88,6 +88,7 @@ public class AbstractCamelContextFactoryBeanTest {
             }, false, false);
 
     // properties that should return value that can be converted to boolean
+    // MDC values deprecated in 4.19.0
     final Set<String> valuesThatReturnBoolean = new HashSet<>(
             asList("{{getStreamCache}}", "{{getDebug}}", "{{getTrace}}", 
"{{getBacklogTrace}}",
                     "{{getMessageHistory}}", "{{getLogMask}}", 
"{{getLogExhaustedMessageBody}}",
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/issues/MDCUnitLoggingOutOfMemoryManualTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/issues/MDCUnitLoggingOutOfMemoryManualTest.java
index ac1eb4540521..c5640ce46c0c 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/issues/MDCUnitLoggingOutOfMemoryManualTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/issues/MDCUnitLoggingOutOfMemoryManualTest.java
@@ -25,6 +25,7 @@ import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 
 @Disabled("CAMEL-16034: Manual test")
+@Deprecated(since = "4.19.0")
 public class MDCUnitLoggingOutOfMemoryManualTest extends ContextTestSupport {
 
     @Override
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbDisabledTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbDisabledTest.java
index 8274df06f8a6..fee276b9f809 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbDisabledTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbDisabledTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.builder.RouteBuilder;
 
 import static org.junit.jupiter.api.Assertions.assertNull;
 
+@Deprecated(since = "4.19.0")
 public class BreadcrumbDisabledTest extends MDCTest {
 
     @Override
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java
index 570900992163..40269b5a762f 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/BreadcrumbTest.java
@@ -22,6 +22,7 @@ import org.apache.camel.builder.RouteBuilder;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class BreadcrumbTest extends MDCTest {
 
     @Override
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCAsyncTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCAsyncTest.java
index 9181dcc05b85..f80d653b1c8f 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MDCAsyncTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MDCAsyncTest.java
@@ -34,6 +34,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.*;
 
+@Deprecated(since = "4.19.0")
 public class MDCAsyncTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCClearingTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCClearingTest.java
index 17e6c147aa12..b5b1b7865ac3 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCClearingTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCClearingTest.java
@@ -34,6 +34,7 @@ import org.slf4j.MDC;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 
+@Deprecated(since = "4.19.0")
 public class MDCClearingTest extends ContextTestSupport {
 
     public static final String CAMEL_BREADCRUMB_ID = "camel.breadcrumbId";
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCCustomKeysTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCCustomKeysTest.java
index af48239c092c..a241f1012e52 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCCustomKeysTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCCustomKeysTest.java
@@ -29,6 +29,7 @@ import static 
org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class MDCCustomKeysTest extends ContextTestSupport {
 
     private final MdcCheckerProcessor checker1 = new 
MdcCheckerProcessor("N/A");
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
index e2db99de1af2..fea33212c1a6 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCErrorHandlerTest.java
@@ -26,6 +26,7 @@ import org.junit.jupiter.api.Assertions;
 import org.junit.jupiter.api.Test;
 import org.slf4j.MDC;
 
+@Deprecated(since = "4.19.0")
 public class MDCErrorHandlerTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionOnCompletionTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionOnCompletionTest.java
index f84834924999..f08f48d90442 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionOnCompletionTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionOnCompletionTest.java
@@ -29,6 +29,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class MDCOnCompletionOnCompletionTest extends ContextTestSupport {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(MDCOnCompletionOnCompletionTest.class);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionParallelTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionParallelTest.java
index 657b00524fc7..043bd8dd878b 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionParallelTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionParallelTest.java
@@ -28,6 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class MDCOnCompletionParallelTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionTest.java
index 63b103282710..11f173012639 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCOnCompletionTest.java
@@ -28,6 +28,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class MDCOnCompletionTest extends ContextTestSupport {
 
     private static final Logger LOG = 
LoggerFactory.getLogger(MDCOnCompletionTest.class);
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetMidRouteProducerTemplateTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetMidRouteProducerTemplateTest.java
index 9f59de6593d9..40ed7b0ecdc7 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetMidRouteProducerTemplateTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetMidRouteProducerTemplateTest.java
@@ -32,6 +32,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
  * routing.
  */
 @Disabled
+@Deprecated(since = "4.19.0")
 public class MDCResetMidRouteProducerTemplateTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java
index d07d9261f21d..a8a07c5b78de 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MDCResetTest.java
@@ -29,6 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 /**
  * Tests that MDC works as a stack remembering old values when routing between 
routes.
  */
+@Deprecated(since = "4.19.0")
 public class MDCResetTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCRouteIdAwareTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCRouteIdAwareTest.java
index d2359cca0b05..ee3fbe6adc10 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCRouteIdAwareTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCRouteIdAwareTest.java
@@ -26,6 +26,7 @@ import org.apache.camel.spi.UnitOfWork;
 import org.junit.jupiter.api.Test;
 import org.slf4j.MDC;
 
+@Deprecated(since = "4.19.0")
 public class MDCRouteIdAwareTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitParallelProcessingTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitParallelProcessingTest.java
index d8d374061d74..d696e5ffb5c6 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitParallelProcessingTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitParallelProcessingTest.java
@@ -28,6 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class MDCSplitParallelProcessingTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitTest.java
index 0944cdaf6117..c4f80dc90751 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MDCSplitTest.java
@@ -28,6 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class MDCSplitTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java
index 9a3e2ecf0106..b07e79b11098 100644
--- a/core/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/processor/MDCTest.java
@@ -26,6 +26,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class MDCTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapCustomKeysTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapCustomKeysTest.java
index 77ac66682104..effd5fd9340e 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapCustomKeysTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapCustomKeysTest.java
@@ -28,6 +28,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class MDCWireTapCustomKeysTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java
index 8abff9972743..e6afb3f4a9c8 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWireTapTest.java
@@ -25,6 +25,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class MDCWireTapTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
index a495b7a468a7..daf84d4dae75 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/MDCWithBreadcrumbTest.java
@@ -23,6 +23,7 @@ import org.slf4j.MDC;
 
 import static org.junit.jupiter.api.Assertions.assertEquals;
 
+@Deprecated(since = "4.19.0")
 public class MDCWithBreadcrumbTest extends MDCTest {
 
     @Override
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkWithMDCLoggingTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkWithMDCLoggingTest.java
index 7616a205eb4c..fa7bda55995c 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkWithMDCLoggingTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/SplitSubUnitOfWorkWithMDCLoggingTest.java
@@ -21,6 +21,7 @@ import org.apache.camel.CamelContext;
 /**
  * Test to ensure MDC logging works with sub unit of work.
  */
+@Deprecated(since = "4.19.0")
 public class SplitSubUnitOfWorkWithMDCLoggingTest extends 
SplitSubUnitOfWorkTest {
 
     @Override
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapMDCTest.java 
b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapMDCTest.java
index 7cf1f611bdca..e27bd37e9953 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/WireTapMDCTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/WireTapMDCTest.java
@@ -27,6 +27,7 @@ import org.slf4j.MDC;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertTrue;
 
+@Deprecated(since = "4.19.0")
 public class WireTapMDCTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
index ce7c6f06b640..8612659607f1 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/aggregator/AbstractDistributedTest.java
@@ -30,6 +30,7 @@ public abstract class AbstractDistributedTest extends 
ContextTestSupport {
     protected CamelContext context2;
     protected ProducerTemplate template2;
 
+    @SuppressWarnings("deprecation")
     @Override
     @BeforeEach
     public void setUp() throws Exception {
diff --git 
a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncMDCTest.java
 
b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncMDCTest.java
index 5304d205c9fe..49d8cfcb81d4 100644
--- 
a/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncMDCTest.java
+++ 
b/core/camel-core/src/test/java/org/apache/camel/processor/async/AsyncMDCTest.java
@@ -28,6 +28,7 @@ import static org.apache.camel.spi.UnitOfWork.*;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 
+@Deprecated(since = "4.19.0")
 public class AsyncMDCTest extends ContextTestSupport {
 
     @Test
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 89b92a71e735..878f38c171b2 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -101,7 +101,7 @@
     { "name": "camel.main.logName", "required": false, "description": "The 
global name to use for Log EIP The name is default the routeId or the 
source:line if source location is enabled. You can also specify the name using 
tokens: ${class} - the logger class name 
(org.apache.camel.processor.LogProcessor) ${contextId} - the camel context id 
${routeId} - the route id ${groupId} - the route group id ${nodeId} - the node 
id ${nodePrefixId} - the node prefix id ${source} - the source:line (s [...]
     { "name": "camel.main.mainListenerClasses", "required": false, 
"description": "Sets classes names that will be used for MainListener that 
makes it possible to do custom logic during starting and stopping camel-main.", 
"sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": 
"string", "javaType": "java.lang.String", "secret": false },
     { "name": "camel.main.mainListeners", "required": false, "description": 
"Sets main listener objects that will be used for MainListener that makes it 
possible to do custom logic during starting and stopping camel-main.", 
"sourceType": "org.apache.camel.main.MainConfigurationProperties", "type": 
"array", "javaType": "java.util.List", "secret": false },
-    { "name": "camel.main.mdcLoggingKeysPattern", "required": false, 
"description": "Sets the pattern used for determine which custom MDC keys to 
propagate during message routing when the routing engine continues routing 
asynchronously for the given message. Setting this pattern to will propagate 
all custom keys. Or setting the pattern to foo,bar will propagate any keys 
starting with either foo or bar. Notice that a set of standard Camel MDC keys 
are always propagated which starts with c [...]
+    { "name": "camel.main.mdcLoggingKeysPattern", "required": false, 
"description": "Sets the pattern used for determine which custom MDC keys to 
propagate during message routing when the routing engine continues routing 
asynchronously for the given message. Setting this pattern to will propagate 
all custom keys. Or setting the pattern to foo,bar will propagate any keys 
starting with either foo or bar. Notice that a set of standard Camel MDC keys 
are always propagated which starts with c [...]
     { "name": "camel.main.messageHistory", "required": false, "description": 
"Sets whether message history is enabled or not. Default is false.", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.modeline", "required": false, "description": 
"Whether to support JBang style \/\/DEPS to specify additional dependencies 
when running Camel JBang", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.name", "required": false, "description": "Sets the 
name of the CamelContext.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
@@ -157,7 +157,7 @@
     { "name": "camel.main.typeConverterStatisticsEnabled", "required": false, 
"description": "Sets whether type converter statistics is enabled. By default 
the type converter utilization statistics is disabled. Notice: If enabled then 
there is a slight performance impact under very heavy load.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.useBreadcrumb", "required": false, "description": 
"Set whether breadcrumb is enabled. The default value is false.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.main.useDataType", "required": false, "description": 
"Whether to enable using data type on Camel messages. Data type are automatic 
turned on if one ore more routes has been explicit configured with input and 
output types. Otherwise data type is default off.", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
-    { "name": "camel.main.useMdcLogging", "required": false, "description": 
"To turn on MDC logging", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
+    { "name": "camel.main.useMdcLogging", "required": false, "description": 
"To turn on MDC logging (deprecated, use camel-mdc component instead)", 
"sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": 
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false, 
"deprecated": true },
     { "name": "camel.main.uuidGenerator", "required": false, "description": 
"UUID generator to use. default (32 bytes), short (16 bytes), classic (32 bytes 
or longer), simple (long incrementing counter), off (turned off for exchanges - 
only intended for performance profiling)", "sourceType": 
"org.apache.camel.main.DefaultConfigurationProperties", "type": "enum", 
"javaType": "java.lang.String", "defaultValue": "default", "secret": false, 
"enum": [ "classic", "default", "short", "simple",  [...]
     { "name": "camel.main.virtualThreadsEnabled", "required": false, 
"description": "Whether to enable virtual threads when creating thread pools. 
When enabled, Camel will use virtual threads instead of platform threads for 
its thread pools. This can also be enabled via the JVM system property {code 
camel.threads.virtual.enabled=true} . This option must be read early during 
bootstrap, so it is set as a system property before thread pools are created.", 
"sourceType": "org.apache.camel.mai [...]
     { "name": "camel.debug.bodyIncludeFiles", "required": false, 
"description": "Whether to include the message body of file based messages. The 
overhead is that the file content has to be read from the file.", "sourceType": 
"org.apache.camel.main.DebuggerConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": true, "secret": false },
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index db63d99a5d65..28f1b035ab10 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -96,7 +96,7 @@ The camel.main supports 131 options, which are listed below.
 | *camel.main.logName* | The global name to use for Log EIP The name is 
default the routeId or the source:line if source location is enabled. You can 
also specify the name using tokens: $\{class} - the logger class name 
(org.apache.camel.processor.LogProcessor) $\{contextId} - the camel context id 
$\{routeId} - the route id $\{groupId} - the route group id $\{nodeId} - the 
node id $\{nodePrefixId} - the node prefix id $\{source} - the source:line 
(source location must be enabled) ${sourc [...]
 | *camel.main.mainListenerClasses* | Sets classes names that will be used for 
MainListener that makes it possible to do custom logic during starting and 
stopping camel-main. |  | String
 | *camel.main.mainListeners* | Sets main listener objects that will be used 
for MainListener that makes it possible to do custom logic during starting and 
stopping camel-main. |  | List
-| *camel.main.mdcLoggingKeys{zwsp}Pattern* | Sets the pattern used for 
determine which custom MDC keys to propagate during message routing when the 
routing engine continues routing asynchronously for the given message. Setting 
this pattern to will propagate all custom keys. Or setting the pattern to 
foo,bar will propagate any keys starting with either foo or bar. Notice that a 
set of standard Camel MDC keys are always propagated which starts with camel. 
as key name. The match rules are a [...]
+| *camel.main.mdcLoggingKeys{zwsp}Pattern* | Sets the pattern used for 
determine which custom MDC keys to propagate during message routing when the 
routing engine continues routing asynchronously for the given message. Setting 
this pattern to will propagate all custom keys. Or setting the pattern to 
foo,bar will propagate any keys starting with either foo or bar. Notice that a 
set of standard Camel MDC keys are always propagated which starts with camel. 
as key name. The match rules are a [...]
 | *camel.main.messageHistory* | Sets whether message history is enabled or 
not. Default is false. | false | boolean
 | *camel.main.modeline* | Whether to support JBang style //DEPS to specify 
additional dependencies when running Camel JBang | false | boolean
 | *camel.main.name* | Sets the name of the CamelContext. |  | String
@@ -152,7 +152,7 @@ The camel.main supports 131 options, which are listed below.
 | *camel.main.typeConverter{zwsp}StatisticsEnabled* | Sets whether type 
converter statistics is enabled. By default the type converter utilization 
statistics is disabled. Notice: If enabled then there is a slight performance 
impact under very heavy load. | false | boolean
 | *camel.main.useBreadcrumb* | Set whether breadcrumb is enabled. The default 
value is false. | false | boolean
 | *camel.main.useDataType* | Whether to enable using data type on Camel 
messages. Data type are automatic turned on if one ore more routes has been 
explicit configured with input and output types. Otherwise data type is default 
off. | false | boolean
-| *camel.main.useMdcLogging* | To turn on MDC logging | false | boolean
+| *camel.main.useMdcLogging* | To turn on MDC logging (deprecated, use 
camel-mdc component instead) | false | boolean
 | *camel.main.uuidGenerator* | UUID generator to use. default (32 bytes), 
short (16 bytes), classic (32 bytes or longer), simple (long incrementing 
counter), off (turned off for exchanges - only intended for performance 
profiling) | default | String
 | *camel.main.virtualThreads{zwsp}Enabled* | Whether to enable virtual threads 
when creating thread pools. When enabled, Camel will use virtual threads 
instead of platform threads for its thread pools. This can also be enabled via 
the JVM system property {code camel.threads.virtual.enabled=true} . This option 
must be read early during bootstrap, so it is set as a system property before 
thread pools are created. | false | boolean
 |===
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
index 578c0a507a70..bbd751cbb94e 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationConfigurer.java
@@ -127,6 +127,7 @@ public final class DefaultConfigurationConfigurer {
      * @param camelContext the camel context
      * @param config       the configuration
      */
+    @SuppressWarnings("deprecation")
     public static void configure(CamelContext camelContext, 
DefaultConfigurationProperties<?> config) throws Exception {
         ExtendedCamelContext ecc = camelContext.getCamelContextExtension();
 
@@ -282,7 +283,9 @@ public final class DefaultConfigurationConfigurer {
         camelContext.setUseBreadcrumb(config.isUseBreadcrumb());
         camelContext.setUseDataType(config.isUseDataType());
         camelContext.setDumpRoutes(config.getDumpRoutes());
+        // Deprecated since 4.19.0
         camelContext.setUseMDCLogging(config.isUseMdcLogging());
+        // Deprecated since 4.19.0
         
camelContext.setMDCLoggingKeysPattern(config.getMdcLoggingKeysPattern());
         camelContext.setLoadTypeConverters(config.isLoadTypeConverters());
         
camelContext.setTypeConverterStatisticsEnabled(config.isTypeConverterStatisticsEnabled());
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
index b0428f11b6cf..6e6980c57581 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java
@@ -117,7 +117,9 @@ public abstract class DefaultConfigurationProperties<T> {
     private boolean jmxManagementRegisterRoutesCreateByKamelet;
     private boolean jmxManagementRegisterRoutesCreateByTemplate = true;
     private boolean camelEventsTimestampEnabled;
+    @Deprecated(since = "4.19.0")
     private boolean useMdcLogging;
+    @Deprecated(since = "4.19.0")
     private String mdcLoggingKeysPattern;
     private String threadNamePattern;
     private String routeFilterIncludePattern;
@@ -1155,17 +1157,20 @@ public abstract class DefaultConfigurationProperties<T> 
{
         this.camelEventsTimestampEnabled = camelEventsTimestampEnabled;
     }
 
+    @Deprecated(since = "4.19.0")
     public boolean isUseMdcLogging() {
         return useMdcLogging;
     }
 
     /**
-     * To turn on MDC logging
+     * To turn on MDC logging (deprecated, use camel-mdc component instead)
      */
+    @Deprecated(since = "4.19.0")
     public void setUseMdcLogging(boolean useMdcLogging) {
         this.useMdcLogging = useMdcLogging;
     }
 
+    @Deprecated(since = "4.19.0")
     public String getMdcLoggingKeysPattern() {
         return mdcLoggingKeysPattern;
     }
@@ -1180,7 +1185,10 @@ public abstract class DefaultConfigurationProperties<T> {
      *
      * 1. exact match, returns true 2. wildcard match (pattern ends with a * 
and the name starts with the pattern),
      * returns true 3. regular expression match, returns true 4. otherwise 
returns false
+     *
+     * Deprecated, use camel-mdc component instead
      */
+    @Deprecated(since = "4.19.0")
     public void setMdcLoggingKeysPattern(String mdcLoggingKeysPattern) {
         this.mdcLoggingKeysPattern = mdcLoggingKeysPattern;
     }
@@ -2487,6 +2495,7 @@ public abstract class DefaultConfigurationProperties<T> {
     /**
      * To turn on MDC logging
      */
+    @Deprecated(since = "4.19.0")
     public T withUseMdcLogging(boolean useMdcLogging) {
         this.useMdcLogging = useMdcLogging;
         return (T) this;
@@ -2595,6 +2604,7 @@ public abstract class DefaultConfigurationProperties<T> {
      * 1. exact match, returns true 2. wildcard match (pattern ends with a * 
and the name starts with the pattern),
      * returns true 3. regular expression match, returns true 4. otherwise 
returns false
      */
+    @Deprecated(since = "4.19.0")
     public T withMdcLoggingKeysPattern(String mdcLoggingKeysPattern) {
         this.mdcLoggingKeysPattern = mdcLoggingKeysPattern;
         return (T) this;
diff --git 
a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
 
b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
index 592918eccd0f..28cdad9e6892 100644
--- 
a/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
+++ 
b/core/camel-management-api/src/main/java/org/apache/camel/api/management/mbean/ManagedCamelContextMBean.java
@@ -163,6 +163,7 @@ public interface ManagedCamelContextMBean extends 
ManagedPerformanceCounterMBean
     boolean isLogMask();
 
     @ManagedAttribute(description = "Whether MDC logging is supported")
+    @Deprecated(since = "4.19.0")
     boolean isUseMDCLogging();
 
     @ManagedAttribute(description = "Whether Message DataType is enabled")
diff --git 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
index cfd2bb3d7693..01ef7c7c3c2f 100644
--- 
a/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
+++ 
b/core/camel-management/src/main/java/org/apache/camel/management/mbean/ManagedCamelContext.java
@@ -431,6 +431,7 @@ public class ManagedCamelContext extends 
ManagedPerformanceCounter implements Ti
     }
 
     @Override
+    @Deprecated(since = "4.19.0")
     public boolean isUseMDCLogging() {
         return context.isUseMDCLogging();
     }
diff --git 
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc 
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
index 8d1a3a836749..17d5c45c20fa 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_19.adoc
@@ -351,6 +351,11 @@ HttpRequest request = 
context.getAttribute(AS2ClientManager.HTTP_REQUEST, HttpRe
 HttpRequest request = context.getRequest();
 ----
 
+
+=== MDC older logic (Deprecation)
+
+The older logic used for MDC (enabled via `camel.main.useMdcLogging = true`) 
is deprecated in favor of `camel-mdc` component.
+
 == Removed deprecated components
 
 The following deprecated components has been removed:
diff --git a/docs/user-manual/modules/ROOT/pages/mdc.adoc 
b/docs/user-manual/modules/ROOT/pages/mdc.adoc
index 8b826418cbf4..92d31caa3c23 100644
--- a/docs/user-manual/modules/ROOT/pages/mdc.adoc
+++ b/docs/user-manual/modules/ROOT/pages/mdc.adoc
@@ -10,7 +10,7 @@ NOTE: The framework should generally handle MDC correctly. 
However, there could
 
 == Enabling MDC
 
-NOTE: Using the new xref:components:others:mdc.adoc[camel-mdc] will automatic 
enabled MDC logging in Camel.
+NOTE: This feature is deprecated. Use the new 
xref:components:others:mdc.adoc[camel-mdc] service component instead.
 
 The first thing you need to do is to enable MDC logging in Camel.
 
diff --git a/proposals/mdc.adoc b/proposals/mdc.adoc
index 4fb883afbe95..8e407f0bcdd0 100644
--- a/proposals/mdc.adoc
+++ b/proposals/mdc.adoc
@@ -5,7 +5,7 @@ authors:
 reviewers: ["@davsclaus"]
 approvers: ["@davsclaus"]
 creation-date: 2025-03-07
-last-updated: 2025-09-25
+last-updated: 2026-03-11
 status: implemented
 see-also: []
 replaces: []
@@ -96,4 +96,8 @@ This design proposals should not introduce any breaking 
compatibility changes. T
 
 === `camel-mdc` component (2025-09-25)
 
-Developed a component which cover the design specifications. See component 
documentation for more details.
\ No newline at end of file
+Developed a component which cover the design specifications. See component 
documentation for more details.
+
+=== Deprecate older MDC logic (2026-03-11)
+
+Added a deprecation notice to invite users to move to the new component.
\ No newline at end of file

Reply via email to