【发布时间】:2019-12-13 00:37:29
【问题描述】:
我使用通过 jms 接收 mq 消息的 spring boot 2.2 应用程序。
数据是json
在我的代码中我有这个配置
@Bean
public MessageConverter jacksonJmsMessageConverter() {
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
converter.setTargetType(MessageType.TEXT);
converter.setTypeIdPropertyName("_type");
return converter;
}
当我通过 IBM MQ Explorer 发送数据时,我收到此错误
org.springframework.jms.support.converter.MessageConversionException: Could not find type id property [_type] on message
有没有办法使用 IBM MQ 资源管理器进行设置?
【问题讨论】:
-
您可能希望查看 RFHUtil 发送的不仅仅是非常简单的测试消息。听起来您需要设置一个消息属性,RFHUtil 应该允许这样做。
-
如果您已经在队列中有想要重播的示例消息,您可以使用
dmpmqmsg实用程序将其保存并重新加载,这将包括完整的消息详细信息,包括消息描述符值和消息属性。
标签: spring-boot ibm-mq spring-messaging