Open zbendhiba opened 3 years ago
Support for JDK serialization/deserialization https://github.com/oracle/graal/pull/2730 was merged recently and should be delivered with GraalVM 21.0.0
I'll add the integration test when we move to GraalVm 21.0.0
Also add integration test for Query on Map, using a Serializable object.
@davsclaus I wonder if we should start a stream to investigate a pluggable strategy for this and other similar cases i.e. allowing to use json, protobuf & what not
The transferExchange
is a bad design as it enforces to use Camel on both sides, and gives the impression that you can transfer the current state of the exchange to some cache / storage, and then retrieve it later, and then continue routing it.
Its for historical use we had it, and when Java objects wasn't yet a big big security vulnerability and warning.
Instead what is a more general concept would be to have an API for serializing / de-serializing a Camel message with its body and header (eg user payload) and not to include internal exchange state that may be stored as exchange properties and whatnot.
Such a API / contract can also be used by EIPs and components to store user payload more easily. And then we can have implementations for common types, such as you refer to with json/xml payloads. And for binary then avro/protobuf/what not
The
transferExchange
is a bad design as it enforces to use Camel on both sides, and gives the impression that you can transfer the current state of the exchange to some cache / storage, and then retrieve it later, and then continue routing it.Its for historical use we had it, and when Java objects wasn't yet a big big security vulnerability and warning.
Instead what is a more general concept would be to have an API for serializing / de-serializing a Camel message with its body and header (eg user payload) and not to include internal exchange state that may be stored as exchange properties and whatnot.
Such a API / contract can also be used by EIPs and components to store user payload more easily. And then we can have implementations for common types, such as you refer to with json/xml payloads. And for binary then avro/protobuf/what not
@davsclaus Maybe you should comment on this issue : https://issues.apache.org/jira/browse/CAMEL-16805. I'm not sure if I understood everything. Should we build something new, or should we change the transferExchange
used in the HazelcastSedaProducer ?
OK added a comment in JIRA.
I think for now we should just NOT support transferExchange in the camel-hazelcast-extension.
Then that can be revisted later when CAMEL-16805 is implemented.
On native mode, it's impossible use to write HazelcastSedaProducer with transferExchange=true. The reason is there an issue while writing object of type DefaultExchangeHolder. It's related to this issue graal#460
Also for integration tests for HazelcastAggregationRepository and ReplicatedHazelcastAggregationRepository, that use the same Serializable class object.