Results 1 to 2 of 2

Thread: JMS Request/Reply using JMS message-driven-adapter

  1. #1

    Default 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. #2

    Default

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

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •