From the course: Spring: Messaging with JMS

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Spring JMS message converters

Spring JMS message converters - Spring Tutorial

From the course: Spring: Messaging with JMS

Start my 1-month free trial

Spring JMS message converters

- [Instructor] You might be wondering, what is a Spring JMS message converter? JMS provides for some basic messaging types like Streams, Map, Text, Object, and Bytes. These JMS message types for the most part form the foundation of all other message types that exist. For example, a JSON or XML message could be easily sent as TextMessages. Images or sound or music files could be sent as ByteMessages. Spring provides out of the box, a default conversion through its SimpleMessageConverter. The SimpleMessageConverter is able to handle TextMessages, BytesMessages, MapMessages, and ObjectMessages. The only base JMS message type that it does not handle is the StreamMessages. We've used JmsTemplate.convertAndSend. The default conversion strategy used with converAndSend is the SimpleMessageConverter. This is the case, unless we specify a different converter in our configuration as a Spring bean. Spring additionally provides some other message converters for use. But, we would have to specify…

Contents