简体   繁体   English

TcpConnection包装的拦截器发布TcpConnectionOpenEvent,其连接工厂属性未知

[英]TcpConnection wrapped interceptor publish TcpConnectionOpenEvent whose connection factory property is unknown

I created a small Tcp communication application linked below. 我在下面创建了一个小的Tcp通信应用程序。

si_tcp_sample si_tcp_sample

It is based on TCP Sample in spring-integration-samples . 它基于spring-integration-samples中的TCP Sample The message generated by the Gateway is sent over TCP by the Outbound Gateway to the Inbound Channel Adapter. 网关生成的消息由出站网关通过TCP发送到入站通道适配器。 In turn the Outbound Channel Adapter echo response comes back over TCP. 反过来,出站通道适配器回显响应通过TCP返回。 This application has two TcpNetClientConnectionFactories, the one is set a interceptor factory chain and another is not. 此应用程序有两个TcpNetClientConnectionFactories,一个设置为拦截器工厂链,另一个则没有。 Running this application, the log like below is outputted. 运行该应用程序,将输出如下所示的日志。

TcpConnectionOpenEvent with TcpConnection wrapped Interceptor↓
16:50:01.411 [main] DEBUG com.neriudon.example.tcp.listener.TcpConnectionEventsListener - ★OPEN★ TcpConnectionOpenEvent [source=SimpleInterceptor:null], [factory=unknown, connectionId=localhost:50001:64609:627f6eb5-401f-44e2-88a9-4f966ee66092] **OPENED** 

TcpConnectionOpenEvent with raw TcpConnection↓
16:50:01.426 [main] DEBUG com.neriudon.example.tcp.listener.TcpConnectionEventsListener - ★OPEN★ TcpConnectionOpenEvent [source=TcpNetConnection:localhost:50002:64610:ee9b0bcd-aa9a-4fdb-9194-2e761caabed6], [factory=client2, connectionId=localhost:50002:64610:ee9b0bcd-aa9a-4fdb-9194-2e761caabed6] **OPENED** 

TcpConnection wrapped interceptor publish TcpConnectionOpenEvent whose connection factory property is "unknown". TcpConnection包装的拦截器发布TcpConnectionOpenEvent,其连接工厂属性为“未知”。 I think that this connection factory property should be "client1". 我认为此连接工厂属性应为“ client1”。 Is it why? 是为什么 (The version of Spring Integration is 4.3.12.) (Spring Integration的版本为4.3.12。)

Editted from here 从这里编辑

Other TcpConnectionEvents' connection factory property seem correct. 其他TcpConnectionEvents的连接工厂属性似乎正确。 For example, TcpConnectionCloseEvent log is below. 例如,下面是TcpConnectionCloseEvent日志。

TcpConnectionCloseEvent with TcpConnection wrapped Interceptor↓
20:26:54.009 [main] DEBUG com.neriudon.example.tcp.listener.TcpConnectionEventsListener - ★CLOSE★ TcpConnectionCloseEvent [source=TcpNetConnection:localhost:50001:53828:ec63181f-3db1-478b-8a38-160a431a8887], [factory=client1, connectionId=localhost:50001:53828:ec63181f-3db1-478b-8a38-160a431a8887] **CLOSED** 

TcpConnectionCloseEvent with raw TcpConnection↓
20:26:54.021 [main] DEBUG com.neriudon.example.tcp.listener.TcpConnectionEventsListener - ★CLOSE★ TcpConnectionCloseEvent [source=TcpNetConnection:localhost:50002:53829:4e02e3cc-7eb8-4e5d-a41a-2e6ff99518aa], [factory=client2, connectionId=localhost:50002:53829:4e02e3cc-7eb8-4e5d-a41a-2e6ff99518aa] **CLOSED** 

It's a bug; 这是一个错误; the connection factory name is not propagated to the interceptor. 连接工厂名称不会传播到拦截器。

Please open a JIRA Issue . 打开JIRA问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM