This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

There is currently no support for an inbound and outbound adapter to share the same socket (and thus asynchronously send a reply to an incoming message). Currently, the only two way communication over a socket is via the simple gateways, which use java.net.Socket.

We have been thinking about having an outbound tcp adapter getting access to the same NIO channel as an inbound adapter. In this environment, the application would be responsible for message correlation (including, perhaps, adding correlation data to the message payloads) but it would allow two-way asynchronous communication over tcp.

Comment

Yes, that is correct; *all* the channel adapters in SI are one-way (inbound or outbound). Gateways provide two-way comms.

The hybrid I am talking about would be a pair of collaborative channel adapters (in and out). For SI to SI communication we could handle the correlation within the framework because we can include correlation data in the stream. When communicating with external systems, it's a little more complicated because we don't "own" the wire protocol in the stream and would have to delegate to the application to provide the correlation.

Regardless of where the correlation is done, we would likely leverage the existing Correlation support in SI where possible.