1

I want to use dynamic-tcp-client in my project as a dynamic-tcp-client. I want to get reply in this client,so I changed the interface ,add a retrun String.

@MessagingGateway()
public interface ToTCP {
    @Gateway(requestChannel = "toTcp.input")
    public String send(String data, @Header("host") String host, @Header("port") int port);
}

I want to get reply message from server

        ToTCP toTcp = context.getBean(ToTCP.class);
    String receive =toTcp.send("foo", "localhost", 1234);

now I get a waring Unexpected message - no endpoint registered with connection interceptor: I don't know how to add the reply-channel?

jsdsh
  • 31
  • 7

1 Answers1

0

The TcpSendingMessageHandler in the dynamic flow needs to be changed to a TcpOutboundGateway for request/reply messaging.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179