Results 1 to 9 of 9

Thread: Is it good to use Spring Integration TCP Adapters in Java Real-Time Applications?

  1. #1
    Join Date
    Dec 2011
    Posts
    7

    Default Is it good to use Spring Integration TCP Adapters in Java Real-Time Applications?

    Is it good to use Spring Integration TCP Adapters in Java Real-Time Applications where the application has target to meet SLA as 2ms?

  2. #2
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    Using the TCP adapters (especially with the length header serializer) is probably the most efficient of all the adapters, due to the lightweight protocol; but there is much more involved in SLA than inter-system communication.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  3. #3
    Join Date
    Dec 2011
    Posts
    7

    Default

    Thanks Russell, The requirement is the TCP Server received two types of messages 1) line feed indicator and 2) Multi byte length indicator. The system is expected to handle 2.5 million transactions in a day as the maximum target.

  4. #4
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    It really depends on the size of the message because, for a line feed EOL, you need to examine every byte to see if it's the LF. The length-header protocol is much more efficient.

    That said, it really depends on what you have to do with the message when you receive it; even a simple parser looking for a linefeed is likely to be noise compared with the actual application code.

    We currently don't have an LF only (de)serializer but you can model a custom one after the ByteArrayCrLfSerializer and/or the ByteArrayStxEtxSerializer.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  5. #5
    Join Date
    Dec 2011
    Posts
    7

    Default Thank you, ow to run multiple TCP port listeners in one java process?

    Thank you, How to run multiple TCP port listeners in one java process using Spring TCP, I saw some sample code using single TCP port, Please share any sample code using for multiple TCP port listeners. (i.e. One java program listens ports such as 9001, 9002, 9004 ..., 9010)

  6. #6
    Join Date
    Oct 2011
    Location
    Mumbai, India
    Posts
    213

    Default

    How about having multiple inbound channel adapter listening to the ports you want?

  7. #7
    Join Date
    Dec 2011
    Posts
    7

    Default Yes

    Yes, looking for similar thing

  8. #8
    Join Date
    Mar 2010
    Location
    Gtr Philadelphia, PA
    Posts
    2,146

    Default

    How to run multiple TCP port listeners in one java process ...
    Yes, you would need to configure a connection factory for each port.
    Gary P. Russell
    Spring Integration Team
    SpringSource, a division of VMware

  9. #9
    Join Date
    Dec 2011
    Posts
    7

    Default Thank you

    Thank you very much

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •