I am not sure this is a bug or (more likely) my misunderstanding on how spring/XSD work.
I have this xml-defined rabbitTemplate :
<rabbit:template id="rabbitTemplate"
connection-factory="rabbitConnectionFactory"
mandatory="true"
channel-transacted="true"
message-converter="simpleMessageConverter"
return-callback="rabbitFailedRoutingReturnCallback"/>
Which does not accept the latest property “return-callback” :
[Error creating bean with name ‘rabbitTemplate’: Invalid property
‘returnCallback’ of bean class
[org.springframework.amqp.rabbit.core.RabbitTemplate]: Bean property
‘returnCallback’ is not writable or has an invalid setter method. Did
you mean ‘returnsCallback’?]
Replacing with “returns-callback” as suggested, and although it is present in TemplateParser, does not work since the property is not present in the latest spring-rabbit xsd. And RabbitTemplate look like it has no setter for returnCallback (without ‘s’).
Switching to standard bean definition works fine :
<bean id="rabbitTemplate" class="org.springframework.amqp.rabbit.core.RabbitTemplate">
<property name="connectionFactory" ref="rabbitConnectionFactory" />
<property name="mandatory" value="true" />
<property name="channelTransacted" value="true" />
<property name="messageConverter" ref="simpleMessageConverter" />
<property name="returnsCallback" ref="rabbitFailedRoutingReturnCallback" />
</bean>
Although, looking at source code from spring-rabbit template source code, it looks fine. So either it has not been published, or I have the wrong url for the published version of it.
So, anyone can help me find out whether it’s a bug or my misunderstanding?
(Since I am still uneasy with spring xml definitions and namespaces, and generally absent-minded, I have rather ask here before raising an issue)