-
Jun 10th, 2010, 03:21 AM
#1
Spring Integration and Java NIO
Hello all
does spring integration offer any facilities for implementing an Asynchronous Server Socket?
are there any Channels / Adapters that can be used for that?
w/kindest regards
Marco
-
Jun 10th, 2010, 06:39 AM
#2
There are NIO channel adapters. Read about them here...
http://static.springsource.org/sprin...erence.html#ip
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.
If this is something you need, please create a JIRA issue.
-
Jun 10th, 2010, 08:32 AM
#3
Gary
thanks for the reply.
Am i correct then in assuming that TcpNioReceivingChannelAdapter is meant only for
unidirectional1 way communication?
regards
marco
-
Jun 10th, 2010, 11:47 AM
#4
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules