2014-07-17 23 views
0

我正在使用spring集成来创建客户端套接字(java代码),它必须将消息发送到服务器套接字(flash客户端)。基本上,我想通过套接字通信将消息推送到闪存,而不必关心它的任何响应。在发送方法被调用时,应该发送的消息来自GW。春季集成:为什么客户端套接字等待服务器的响应?

我能够推送消息,但问题是我的客户端套接字正在等待响应,如果它没有得到一个它在某个时间点超时。下面是我的配置:

<int:gateway id="gw" 
    service-interface="integration.MessageGateway" 
    default-request-channel="input"/> 

<int-ip:tcp-connection-factory id="client" 
    type="client" 
    host="localhost" 
    port="6767" 
    serializer="clientSerializer" 
    single-use="true" so-keep-alive="true" 
    so-timeout="10000"/> 

<bean id="clientSerializer" class="org.springframework.integration.ip.tcp.serializer.ByteArrayCrLfSerializer" /> 

<int:channel id="input" /> 

<int-ip:tcp-outbound-gateway id="outGateway" 
    request-channel="input" 
    connection-factory="client" 
    request-timeout="10000" 
    reply-timeout="10000"/> 

回答

相关问题