Is it good to use Spring Integration TCP Adapters in Java Real-Time Applications where the application has target to meet SLA as 2ms?
Is it good to use Spring Integration TCP Adapters in Java Real-Time Applications where the application has target to meet SLA as 2ms?
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
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.
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
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)
How about having multiple inbound channel adapter listening to the ports you want?
Yes, looking for similar thing
Yes, you would need to configure a connection factory for each port.How to run multiple TCP port listeners in one java process ...
Gary P. Russell
Spring Integration Team
SpringSource, a division of VMware
Thank you very much