Hi,
I've been working with camel 2.0-m2 so far. Some behaviors related to
getting and setting JmsMessage header and body appear very annoying.
Just try to confirm/discuss here if they are like so in design or require a fix:
1. I can't use setBody(null) to remove the payload of the message.
instead, I have to use setBody("") or similar value to represent an
empty payload, which can be problematic in some cases, as NULL and
non-NULL value will suggest completely different to other components.
2. getHeader(key) and getHeaders().get(key) can return different
results, because getHeader will look first in the original jms message
if the header is available, but the same header in the internal map
may be modified as setHeader will only modify the internal map. this
is all very confusing and 'inconsistent' if people don't know. Since
the original properties of the jms message are copied into the
internal map, why do we ever need to have these operations like
set/getBody, set/getHeader and removeHeader have to tackle on the
original jms message?
Thanks!
Zhi