You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2026/08/27 13:13:51 UTC
(camel) branch deprecate-memoryidempotentrepository-and-memoryagg created (now 789db3e5923c)
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a change to branch deprecate-memoryidempotentrepository-and-memoryagg
in repository https://gitbox.apache.org/repos/asf/camel.git
at 789db3e5923c CAMEL-24463: Deprecate MemoryIdempotentRepository and MemoryAggregationRepository
This branch includes the following new commits:
new 789db3e5923c CAMEL-24463: Deprecate MemoryIdempotentRepository and MemoryAggregationRepository
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(camel) 01/01: CAMEL-24463: Deprecate MemoryIdempotentRepository and MemoryAggregationRepository
Posted by gn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch deprecate-memoryidempotentrepository-and-memoryagg
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 789db3e5923c294463e47dae85224aa8c44f508e
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Aug 27 15:13:37 2026 +0200
CAMEL-24463: Deprecate MemoryIdempotentRepository and MemoryAggregationRepository
Deprecate MemoryIdempotentRepository and MemoryAggregationRepository in favor
of KeyValueIdempotentRepository and KeyValueAggregationRepository wrapping
MemoryKeyValueRepository. This is a follow-up to the KeyValueRepository SPI
introduced in PR #25631.
The deprecated classes continue to work but users are encouraged to migrate to
the new KeyValue-based replacements which provide a uniform abstraction that can
be backed by any store (in-memory, Redis, JDBC, etc.).
Co-Authored-By: Claude Opus 4.6 <no...@anthropic.com>
---
.../camel/bean/MemoryAggregationRepository.json | 2 +-
.../aggregate/MemoryAggregationRepository.java | 5 ++++
.../camel/bean/MemoryIdempotentRepository.json | 2 +-
.../idempotent/MemoryIdempotentRepository.java | 5 ++++
.../ROOT/pages/camel-4x-upgrade-guide-4_23.adoc | 32 ++++++++++++++++++++++
5 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryAggregationRepository.json b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryAggregationRepository.json
index 16fc81255246..db86a28c9e61 100644
--- a/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryAggregationRepository.json
+++ b/core/camel-core-processor/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryAggregationRepository.json
@@ -6,7 +6,7 @@
"interfaceType": "org.apache.camel.spi.AggregationRepository",
"title": "Memory Aggregation Repository",
"description": "A memory based AggregationRepository which stores Exchange in memory only.",
- "deprecated": false,
+ "deprecated": true,
"groupId": "org.apache.camel",
"artifactId": "camel-core-processor",
"version": "4.23.0-SNAPSHOT",
diff --git a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/MemoryAggregationRepository.java b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/MemoryAggregationRepository.java
index 62b0946f4d53..3b31cf11c9e0 100644
--- a/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/MemoryAggregationRepository.java
+++ b/core/camel-core-processor/src/main/java/org/apache/camel/processor/aggregate/MemoryAggregationRepository.java
@@ -32,7 +32,12 @@ import org.apache.camel.support.service.ServiceSupport;
* A memory based {@link org.apache.camel.spi.AggregationRepository} which stores {@link Exchange}s in memory only.
*
* Supports both optimistic locking and non-optimistic locking modes. Defaults to non-optimistic locking mode.
+ *
+ * @deprecated since 4.23.0. Use {@link org.apache.camel.support.KeyValueAggregationRepository} wrapping a
+ * {@link org.apache.camel.support.MemoryKeyValueRepository} instead. For example:
+ * {@code new KeyValueAggregationRepository(new MemoryKeyValueRepository())}
*/
+@Deprecated(since = "4.23.0")
@Metadata(label = "bean",
description = "A memory based AggregationRepository which stores Exchange in memory only.",
annotations = { "interfaceName=org.apache.camel.spi.AggregationRepository" })
diff --git a/core/camel-support/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryIdempotentRepository.json b/core/camel-support/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryIdempotentRepository.json
index 690e62c15fc0..cfac3f088734 100644
--- a/core/camel-support/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryIdempotentRepository.json
+++ b/core/camel-support/src/generated/resources/META-INF/services/org/apache/camel/bean/MemoryIdempotentRepository.json
@@ -6,7 +6,7 @@
"interfaceType": "org.apache.camel.spi.IdempotentRepository",
"title": "Memory Idempotent Repository",
"description": "A memory based IdempotentRepository.",
- "deprecated": false,
+ "deprecated": true,
"groupId": "org.apache.camel",
"artifactId": "camel-support",
"version": "4.23.0-SNAPSHOT",
diff --git a/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/MemoryIdempotentRepository.java b/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/MemoryIdempotentRepository.java
index 0e0f21be3db4..cd2bbdcdd581 100644
--- a/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/MemoryIdempotentRepository.java
+++ b/core/camel-support/src/main/java/org/apache/camel/support/processor/idempotent/MemoryIdempotentRepository.java
@@ -37,7 +37,12 @@ import org.apache.camel.support.service.ServiceSupport;
* algorithm.
* <p/>
* Care should be taken to use a suitable underlying {@link Map} to avoid this class being a memory leak.
+ *
+ * @deprecated since 4.23.0. Use {@link org.apache.camel.support.KeyValueIdempotentRepository} wrapping a
+ * {@link org.apache.camel.support.MemoryKeyValueRepository} instead. For example:
+ * {@code new KeyValueIdempotentRepository(new MemoryKeyValueRepository())}
*/
+@Deprecated(since = "4.23.0")
@Metadata(label = "bean",
description = "A memory based IdempotentRepository.",
annotations = { "interfaceName=org.apache.camel.spi.IdempotentRepository" })
diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
index a0caf69df188..70c2d8f2ae32 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc
@@ -131,6 +131,38 @@ The component camel-threadpoolfactory-vertx was deprecated in 4.21. The componen
`camel-zeebe` component was deprecated in 4.19 and has a straightforward replacement with `camel-camunda`. It is removed in 4.23.
+=== camel-core - MemoryIdempotentRepository and MemoryAggregationRepository deprecated
+
+`MemoryIdempotentRepository` and `MemoryAggregationRepository` are deprecated in favor of the new
+`KeyValueIdempotentRepository` and `KeyValueAggregationRepository` adapters wrapping a
+`MemoryKeyValueRepository`. The new classes delegate to the `KeyValueRepository` SPI introduced in
+4.23, which provides a uniform key-value abstraction that can be backed by any store (in-memory,
+Redis, JDBC, etc.).
+
+To migrate from `MemoryIdempotentRepository`:
+
+[source,java]
+----
+// Before
+IdempotentRepository repo = MemoryIdempotentRepository.memoryIdempotentRepository();
+
+// After
+IdempotentRepository repo = new KeyValueIdempotentRepository(new MemoryKeyValueRepository());
+----
+
+To migrate from `MemoryAggregationRepository`:
+
+[source,java]
+----
+// Before
+AggregationRepository repo = new MemoryAggregationRepository();
+
+// After
+AggregationRepository repo = new KeyValueAggregationRepository(new MemoryKeyValueRepository());
+----
+
+The deprecated classes continue to work but will be removed in a future release.
+
=== camel-a2a - webhook URL address classification
Push notification webhook URLs are now classified by the address the host resolves to, using the