davsclaus opened a new pull request, #30394: URL: https://github.com/apache/camel/pull/30394
## Backport of #30368 Backport of #30368 (CAMEL-27225: camel-redis - RedisAggregationRepository stores exchanges in Java serialization and reads them through a deserialization filter) onto `camel-4.18.x`, for 4.18.6. JIRA: [CAMEL-27225](https://issues.apache.org/jira/browse/CAMEL-27225) **Original PR:** #30368 (squash commit f5dfccb98347) **Original author:** @davsclaus **Target branch:** `camel-4.18.x` ### Straight or adapted Adapted. This is a port of the same behaviour to the `RedisAggregationRepository` of `camel-4.18.x`: - **Same behaviour and options as `main`:** `deserializationFilter`, `codec`, the WARN at start on the first 100 entries, and `recover()` skipping an unreadable exchange. - **Filter:** `DeserializationFilterHelper`, and the `CamelObjectInputStream` constructor that takes a filter, do not exist on this branch. - The repository uses this branch's `CamelObjectInputStream(in, context)` and `setObjectInputFilter`, with a private resolver. - The resolver has the same logic as `main`: the option if set, otherwise `jdk.serialFilter`, otherwise the default filter of `main` (including `javax.**` and the three limits). - **Annotations:** `@Metadata` on this branch has no `security` attribute, and the class has no class-level `@Metadata`/`@Configurer`. So `codec` is labelled `advanced,security` without `insecure:serialization`, no configurer or bean JSON is generated, and there is no catalog `redis.adoc` on this branch. - **Removes:** there is no Lua script on this branch, and the pessimistic remove keeps this branch's logic, as on `camel-4.22.x`. - **Version wording:** "4.18.5 or older", and the WARN points to the Camel 4.18 upgrade guide. - **Tests:** this branch had no repository operations IT. `RedisAggregationRepositoryOperationsIT` is new, ported from `camel-4.22.x` on JUnit 5 and without `testEndpointValidation`. `RedisAggregationRepositoryCodecIT` extends it. - **Upgrade guide:** the entry is left out of this PR. The 4.18.6 note goes into `camel-4x-upgrade-guide-4_18.adoc` on `main`, in a separate doc PR. ### Tests - `RedisAggregationRepositoryDeserializationTest`: 14 tests pass. - ITs against Redis: `AggregateRedisIT` (1), `RedisAggregationRepositoryOperationsIT` (13) and `RedisAggregationRepositoryCodecIT` (14) pass. The codec IT includes reading entries written the old way, with `Kryo5Codec`. - On the unpatched branch, a body of a class outside the filter is read back. With the change, it is refused. _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]
