Announcement Announcement Module
Collapse
No announcement yet.
Spring Integration and Java NIO Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #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.

    Comment


    • #3
      Gary
      thanks for the reply.
      Am i correct then in assuming that TcpNioReceivingChannelAdapter is meant only for
      unidirectional1 way communication?

      regards
      marco

      Comment


      • #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.

        Comment

        Working...
        X