I am trying this spring JMS sample, and it gives error.
https://spring.io/guides/gs/messaging-jms/
Caused by: org.springframework.jms.support.converter.MessageConversionException: Could not find type id property [_type] on message from destination [queue://mailbox]
Interesting part is, if I clone it and run everything runs fine. If I copy and paste, it gives error.
@Bean // Serialize message content to json using TextMessage
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
This piece of code actually causing the error. Searching the web and documentation, I still have no clue how and what to set setTypeIdPropertyName value and with "_type" what it refers in this project to? As the message does not have such property, then where is it coming from ?