PDA

View Full Version : JMS outbound-channel-adapter with destination-resolver



jjliston
Sep 24th, 2009, 01:28 PM
I'm using spring-integration-1.0.3.RELEASE and having difficulty with the JMS outbound-channel-adapter configuration. When I configure the adapter using a connection-factory, destination-name and destination-resolver, it appears that the destination-resolver property is ignored. The destination name does not get resolved.



<outbound-channel-adapter channel="channel1" destination-name="queue1" destination-resolver="jmsDestinationResolver" connection-factory="jmsConnectionFactory" />


However, if I configure a JmsTemplate bean with these same properties and then configure configure the adapter with the template, then the destination name does get resolved.



<outbound-channel-adapter channel="channel1" jms-template="queue1Template" />
<bean id="queue1Template" class="org.springframework.jms.core.JmsTemplate">
<property name="defaultDestinationName" value="queue1" />
<property name="destinationResolver" ref="jmsDestinationResolver" />
<property name="connectionFactory" ref="jmsConnectionFactory" />
</bean>


Shouldn't these two configurations have the same behavior?

keizersoze
Nov 25th, 2009, 10:29 AM
I've got the same problem.
The error return is


This destination does not exist !QUEUE.myTopic

Like it wrote in Javadoc, this is because topic is not found


setReplyDestinationName

public void setReplyDestinationName(java.lang.String replyDestinationName)

Set the name of the JMS Destination from which reply Messages should be received. If none is provided, this gateway will create a TemporaryQueue per invocation.


Nobody has i suggestion ??

keizersoze
Dec 22nd, 2009, 07:30 AM
add this property to force topic instead of queue


<property name="pubSubDomain" value="true"/>