Hi Johannes, I would use a special purpose payload object based on approach B, because the name and timestame do not seem to be used by Camel endpoints. If you then need to send the name and the timestamp, for example as HTTP headers, I would use a special purpose route element that sets those headers.
Hope this helps Regards, Mitko From: "Klug, Johannes" <[email protected]> To: <[email protected]> Date: 05.05.2011 11:00 Subject: [RMX:#] How should you use message headers? Dear all, We're having some discussions within our team on how to use message header fields. A bit of background: One of our applications decodes binary data, and splits that into usable data. Possible outcomes are int, long, float, double, Boolean, byte[], and possibly others we haven't implemented support for yet. These pieces of data each have a name and a reception timestamp. We see two solutions, but can't agree on which is the right one. A) Put the int, float, byte[], whatever, in the message body. Add header fields for name and timestamp. B) Have a class that has three fields: name, timestamp, and value (of type Object, so it can hold anything). Which one would you prefer, for what reasons? Thanks, Johannes Think green - keep it on the screen. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. InterComponentWare AG: Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler Aufsichtsratsvors.: Prof. Dr. Christof Hettich Firmensitz: 69190 Walldorf, Altrottstraße 31 AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
