[
https://issues.apache.org/jira/browse/CAMEL-15762?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen updated CAMEL-15762:
--------------------------------
Fix Version/s: 4.0
(was: Future)
> camel-core - Move constants on Exchange to its own class
> --------------------------------------------------------
>
> Key: CAMEL-15762
> URL: https://issues.apache.org/jira/browse/CAMEL-15762
> Project: Camel
> Issue Type: Improvement
> Components: camel-core
> Reporter: Claus Ibsen
> Priority: Major
> Fix For: 4.0
>
>
> We have many constants on the Exchange interface. But its discouraged to have
> that on interfaces.
> If we have a constant class instead to keep those on that would be better.
> But the Exchange have had these for a long time, os its maybe a Camel 4
> change.
> This also helps reduce the object size of Exchange instances in memory as
> they dont have reference to those 100+ constants. Today they take up space,
> and an empty exchange is around 1000-1500 bytes. Its actuall the class
> instance that takes up extra memory. So not sure if the instances of
> DefaultExchange will reduce memory, but constant fields on interface is
> regarded as anti pattern by Java experts.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)