Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: TCP receive message to different port than sent on

  1. #11
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,024

    Default

    When you use the standard correlation id header (correlationId) you can just eliminate the correlation strategy from the aggregator - it will use that header by default.
    Last edited by Gary Russell; Feb 13th, 2013 at 11:05 AM.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  2. #12
    Join Date
    Jan 2013
    Posts
    17

    Default

    That worked.

    From the logs, I can see the messages being correlated, and the transformer outputting the message that contains the credit report. But for some reason, it doesn't get sent to the client-side tcp-inbound adapter.

    This config:
    Code:
    <int:bridge
    		order="1"
    		input-channel="finalRequest"
    		output-channel="toAggregator"/>
    	
     	<int-ip:tcp-inbound-channel-adapter
     		id="fromServerSide"
     		channel="fromTransformer"
     		connection-factory="requestCF"/>
    
    	<int:channel
    		id="toAggregator"
    		datatype="java.lang.String"/>
    		
    	<int:channel
    		id="toTransformer"/>
    		
    	<int:channel
    		id="fromTransformer"/>
    		
    	<int:aggregator
    		input-channel="toAggregator"
    		output-channel="toTransformer"
    		release-strategy-expression="size() == 2"/>
    
    	<int:transformer
    		input-channel="toTransformer"
    		output-channel="fromTransformer"
    		expression="payload.get(1)"/>
    results in this error:
    Code:
    [02-13-2013 14:11:55,507] ERROR TcpNetConnection:155 Exception sending meeeage: [Payload=[B@1445748][Headers={timestamp=1360782715460, id=862e2275-103e-4453-8ad2-345348896316, ip_tcp_remotePort=3411, ip_address=10.127.211.92, ip_hostname=VMCAP2ISDEVMED, ip_connectionId=VMCAP2ISDEVMED:3411:c8eff8bc-fb84-4e86-951b-90b712078091}]
    org.springframework.integration.MessageDeliveryException: Dispatcher has no subscribers for channel fromTransformer.
    Doesn't this config make the tcp-inbound-channel-adapter a subscriber to the fromTransformer channel?

  3. #13
    Join Date
    Jan 2013
    Posts
    17

    Default

    I figured it out.

    I forgot to add the default-reply-channel to my gateway.

    I'm now able to send a request and get a response back.

    Thanks for the help.

  4. #14
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,024

    Default

    Cool!

    Glad to help.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

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
  •