Announcement Announcement Module
Collapse
No announcement yet.
RendezvousChannel Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RendezvousChannel

    I have a message-driven-channel-adapater that receives a JMS message and forwards it onto a channel. The MessageEndPoint on that channel then needs to forward the "request" onto another JMS (outside the JVM) and wait until a response is made.

    I was looking at the documentation and the RendezvousChannel seemed like a good solution, however, I cannot seem to figure out how to configure the channel to forward onward to a specific queue. How do I configure the message be sent to a specific Destination and have it then return to my block so that I can process the reply. Here is some sample code im working with.

    My inbound configuration
    Code:
    <jms:message-driven-channel-adapter
    	id="registrationInbound" destination="registrationQueue" channel="registrationChannel" />
    My endpoint method
    Code:
    @ServiceActivator(inputChannel = "registrationChannel")
    public void registerClient(byte[] payload,
    		@Headers Map<String, Object> headerMap) {
    
    	RendezvousChannel rendezvous = new RendezvousChannel();
    	Message<byte[]> message = MessageBuilder.withPayload(payload)
    				.setReplyChannel(rendezvous).build();
    	rendezvous.send(message)) 
    	Message<byte[]> replyMessage = (Message<byte[]>) rendezvous.receive();
    
            // do something else
    }
    Much appreciated.

  • #2
    It sounds like you just need to use a JMS outbound gateway. Have you looked at that? You can see an example in the 'org.springframework.integration.samples.jms' package.

    Comment


    • #3
      Originally posted by Mark Fisher View Post
      It sounds like you just need to use a JMS outbound gateway. Have you looked at that? You can see an example in the 'org.springframework.integration.samples.jms' package.
      Well I need to retain the reply-to from the original JMS message. I need to take some of the information from the payload and pass it to another server and receive its reply. Then compile a response to the original sender. So I would imagine that I would need to have the message being passed to the other server running in the same thread.

      Comment

      Working...
      X