I don't see a way of removing the packing of bytes without breaking interoperability or backward compatibility. Why can't we put the TextMessage in the body as well (like the ObjectMessage)?
Why can't we put the TextMessage in the body as well (like the ObjectMessage)?
At the moment we put into the body whatever getMessageContent returns as a byte array. That can't change or we break backward compatibility. Whatever is going in there now, has to continue to go in there in the 4.2 release. If we want to have additional information elsewhere in the Message body, then that's fine: it's new so we don't have to worry about existing users.
Whatever is going in there now, has to continue to go in there in the 4.2 release.
Well "later" could be a lot later, so if we can add the required information as well as the byte stream *or* allow for users to override what goes into the message at deployment or runtime, I think we should. We just need to have a backward compatibility option too :-)