Announcement Announcement Module
Collapse
No announcement yet.
JMS Request/Reply using JMS message-driven-adapter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS Request/Reply using JMS message-driven-adapter

    Hi ,
    I am trying to do a request/response using spring integration JMS message-driven-channel-adapter component.
    The client will send temporary queue name in JMS reply to header.
    However it deosnt work.

    Is it possible to do a request/response style of communication using temporary queues and JMS message-driven-channel-adapter?

    Can we set expectReply to true for ChannelPublishingJmsMessageListener in case of JMS message-driven-channel-adapter?

    The spring integration configurations is as below:


    Code:
    <amq:queue id="registrationQueue" physicalName="taskmanager.registration.queue" />
    
    <int-jms:message-driven-channel-adapter
    		id="registrationInbound" destination="registrationQueue" channel="receiveRegistrationChannel" />
    
    <int:channel id="receiveRegistrationChannel"/>
    
    <bean id="registrationService"
    		class="com.yodlee.atf.taskmanager.service.impl.DefaultRegistrationService" />
    
    <int:service-activator input-channel="receiveRegistrationChannel" ref="registrationService"/>
    The code for Service Activator is as below:

    Code:
    public class DefaultRegistrationService implements RegistrationService {
    
    	private final Logger logger = LoggerFactory.getLogger(getClass());
    	@Override
    	public String register(Message<?> message) {
    		final Queue replyDestination = (Queue) message.getHeaders().get("jms_replyTo");
    		logger.info("Returning the NodeId to subscriber GridNode "+UUID.randomUUID().toString());
    		return nodeId.toString();
    	}
    }
    Thanks

  • #2
    Sorry for the trouble , I figured out that JMS inbound gateway will serve the purpose

    Comment

    Working...
    X