I have a quick question on the message converter options on a JMS Outbound Channel Adapter.
I'm putting a Message<Document> into the channel. Is there any way of specifying how you want the Document rendered, i.e. as a TextMessage or BytesMessage?
As I understand it, the default SimpleMessageConverter does this:
if payload is a String, create a TextMessage
else if payload is a byte create a BytesMessage
else if payload is a Map create a MapMessage
else serialise as a ObjectMessage
It looks like its sending an ObjectMessage, which is not what I want. Ideally, I'd like the message converter to allow me to specify the JMS Message type and render accordingly, or at least detect Document payloads (maybe default to TextMessage?).
Is there any plan to add this functionality or am I resigned to implementing my own MessageConverter?
(the other option is to do a transform from Message<Document> to Message<String> prior to the JMS send but I find that a bit clunky)