SimpleMessageConverter is the default converter for both JmsTemplate and RabbitTemplate. It turns supported application values into messages so you can pass a value to convertAndSend() instead of creating a message yourself. The two templates use their respective messaging APIs, so their supported conversions differ. section 9.1.2 section 9.2.2
Table 9.3 Spring message converters for common conversion tasks (all in the org.springframework.jms.support.converter package) (view table figure)
For JMS, the conversion table shows the matching message type: String to TextMessage, byte arrays to BytesMessage, Map to MapMessage, and Serializable objects to ObjectMessage. section 9.1.2
Send an order through JMS
Call jms.convertAndSend("tacocloud.order.queue", order) to send an order without constructing a JMS Message. With the default converter, an order sent as an object must implement Serializable. section 9.1.2
If that Serializable requirement does not suit the application, declare a MappingJackson2MessageConverter bean to use JSON for JMS messages instead. Configure its type-ID property so the receiver can determine the incoming object's type. For RabbitTemplate, the default SimpleMessageConverter supports String, byte arrays, and Serializable types; a Jackson2JsonMessageConverter bean can replace it for JSON conversion. section 9.1.2 section 9.2.2
