Is it possible to receive data stream from remote host and port using spring integration TCP adapters? If yes, how do I create it dynamic TCP adapter on spring 4 & spring java DSL?
1
votes
1 Answers
0
votes
The <int-ip:tcp-inbound-channel-adapter> is backed by the TcpReceivingChannelAdapter. So you should configure @Bean for that as well as @Bean for the TcpNetClientConnectionFactory.
If you want use that from the Spring Integration Java DSL , you can simply start your IntegrationFlow using appropriate factory method:
@Bean
public IntegrationFlow tcpFlow() {
return IntegrationFlows.from(myTcpAdapter())
.....
get();
}
Right, there is no yet DSL for IP components, so feel free to raise a JIRA ticket on the matter and we'll take care of that for the 1.1 release.