Claus Ibsen created CAMEL-26567:
-----------------------------------
Summary: camel-jms / camel-sjms - text that is not a String is
sent as a TextMessage, and the ObjectMessage error names the class of the body
Key: CAMEL-26567
URL: https://issues.apache.org/jira/browse/CAMEL-26567
Project: Camel
Issue Type: Improvement
Components: camel-jms, camel-sjms
Reporter: Claus Ibsen
Fix For: 4.24.0
camel-jms and camel-sjms send a String body as a TextMessage. Other text, such
as a StringBuilder or a Groovy GString, is sent as an ObjectMessage.
ObjectMessage is off by default since Camel 4.14, so the exchange fails, and
the error only says to set objectMessageEnabled=true. A user who does that
sends the text as a serialized Java object, and the consumer may then block it
("deserialization blocked for class ...").
* Send any CharSequence body as a TextMessage.
* When ObjectMessage is disabled, the error names the class of the body, and
says how to send it as text (convertBodyTo with type String) or as JSON
(marshal), before it mentions objectMessageEnabled=true.
jmsMessageType=Object and the CamelJmsMessageType header still send an
ObjectMessage. camel-amqp, camel-activemq and camel-sjms2 get the change
through camel-jms and camel-sjms.
Related: CAMEL-26566 (camel-groovy gives a String for a GString).
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)