Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15762

camel-core - Move constants on Exchange to its own class

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.0
    • camel-core
    • None
    • Unknown

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: