0
votes

I'm trying to create an iso8385 TCP server using Spring Integration. A typical scenario would be the following:

  • a client connects to the server and deposits an ISO8385 message
  • the server processes the message
  • the server formulates a response and closes the connection

I want to keep track of each new TCP connection, and create an identifier for it, in order to associate each processing to the connected client. But I don't know how to do that. The idea would be to have:

  • a tcp inbound adapter, that transforms ISO8385 into a java class
  • a service activator which will process the message
  • a tcp outbound adapter, that transforms a java class into an ISO8385 message
  • a channel (but where ?)
  • a identifier for a TCP session that is shared between all of these

Does anyone know how to perform this ?

1

1 Answers

0
votes

Actually <int-tcp:tcp-inbound-gateway> does the stuff for you:

  • you configure <int-tcp:tcp-connection-factory type="server">
  • inject it into the <int-tcp:tcp-inbound-gateway>
  • all other correlation logic is encapsulated in the last one

I have some experience with iso8385, but I don't think that there is a reason to get deal here with MCC or terminalId to correlate messages.

Would be more interest to provide some routing logic for ISO message types. But it is a different story...