-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Closed
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply
Description
The configuration for the JmsMessagingTemplate is wrong (at least in my opinion). For the JmsTemplate you can configure the MessageConverter and it will be used. However, that converter is not passed to the JmsMessagingTemplate, and therefore the default one is used.
Maybe this is an issue for spring-jms, but I think that it should be correctly configured. It is not complicated as well. One only needs to get the message converter that the JmsTemplate has.
I think that this would be the solution in the MessagingTemplateConfiguration:
@Bean
@ConditionalOnMissingBean
@ConditionalOnSingleCandidate(JmsTemplate.class)
public JmsMessagingTemplate jmsMessagingTemplate(JmsTemplate jmsTemplate) {
JmsMessagingTemplate messasgingTemplate = new JmsMessagingTemplate(jmsTemplate)
if (jmsTemplate.getMessageConverter() != null) {
messagingTemplate.setConverter(jmsTemplate.getMessageConverter();
}
return messagingTemplate;
}Metadata
Metadata
Assignees
Labels
status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently apply