0

My application uses Java and Spring Integration for Tcp connection. There are two types of features, In first I need to connect application as client and in another need to connect as server. Both are having two way communication using gateway using spring Integration.

I need to write gatling script for same, but I am new to gatling.

It would be great if there is sample program which is similar to my requirement, that I can refer as reference. Also I was not able to find any option for TCP in recorder.

Any help/pointer is really appreciated.

1 Answers1

0

Looks like existing Spring Integration TCP Sample meets your requirements.

You can find there an XML config for the:

<int-ip:tcp-connection-factory id="crLfServer"
    type="server"
    port="${availableServerSocket}"/>

with an appropriate <int-ip:tcp-inbound-gateway> and:

<int-ip:tcp-connection-factory id="client"
    type="client"
    host="localhost"
    port="${availableServerSocket}"
    single-use="true"
    so-timeout="10000"/>

for the client side to communicate via <int-ip:tcp-outbound-gateway>.

Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • Coding TCP connection is done using spring Integration, now need to test performance using gatling. For that need to write code in scala, but most of example on net is for http. – Prabhjot Sokhi Jan 30 '18 at 19:48
  • The information i can get so far is, there is a library gatling-tcp-extensions for tcp, but not able to find any sample program in scala – Prabhjot Sokhi Jan 30 '18 at 19:51
  • Oh! So, just right those tests on Java! Let me know that my answer is not related and I'll remove it! – Artem Bilan Jan 30 '18 at 19:57
  • For gatling scenario needs to be written in scala, I am able to find only one link https://github.com/scalecube/gatling-tcp-extensions but this has the code for gatling-tcp-extention library not a sample program for reference – Prabhjot Sokhi Jan 31 '18 at 17:33