davsclaus opened a new pull request, #30368: URL: https://github.com/apache/camel/pull/30368
[CAMEL-27225](https://issues.apache.org/jira/browse/CAMEL-27225) ## What changed - `RedisAggregationRepository` stores the `DefaultExchangeHolder` of each exchange in Java serialization, with the correlation key (or exchange id) as a plain string field. Before, it used the codec of the Redisson client, by default `Kryo5Codec`. - Values are read back through an `ObjectInputFilter`, like the JDBC, Cassandra, Infinispan and key/value repositories. - New `deserializationFilter` option, in `jdk.serialFilter` syntax. - When it is not set, the JVM-wide `jdk.serialFilter` applies. - Without that either, the default Camel filter applies: the `java`, `javax` and `org.apache.camel` packages, except `java.net`. - The optimistic remove Lua script passes its arguments as bytes, to match the new field and value encoding. - At start, the repository logs a WARN when its hashes hold entries in another format. The WARN gives the count per hash, never the content, and the repository still starts. - Docs: a "Storage format" section on the redis page. The catalog bean JSON is regenerated. ## Upgrade note Added to the 4.24 upgrade guide. - Exchanges stored by older versions are not read. When the repository starts, it logs a WARN with the number of such entries in each hash. - Finish aggregations and recovery before upgrading, or remove the hashes. - Bodies or headers of your own classes need the filter widened, and they must be `Serializable`. - A codec set on an injected `RedissonClient` is no longer used for these hashes. ## Tests - New unit test `RedisAggregationRepositoryDeserializationTest` (9 tests, in-memory hashes). It covers: - a round trip; - the default filter rejecting a class outside the allowed packages, and a custom filter allowing it; - `recover()` applying the filter; - values in another format being rejected; - the WARN at start for old entries, and no WARN for new ones. - New ITs in `RedisAggregationRepositoryOperationsIT`. The one for a class outside the filter fails without the change. - The camel-redis ITs pass against Redis. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
