0
  1. As far as my knowledge, we can receive ISO8583 message from one host/switch and do some processing and forward the message to another host/switch using server.xml, channel.xml and mux.xml config files.
  2. We can route the message based on the IP config that is specified in channel.xml which is static (in the sence it is predefined).

Requirement: I want to develop an application using JPOS Q2 Server as a payment gateway router. The basic requirement is that Q2 server must be able to route the incoming message based on one field(as an identifier) from that incoming message and pick up the destination route from Database dynamically and send the message further to destination host. Is this can be accomplished using JPOS Q2 Server? If yes, how?

Message Flow: Source -> (ISO message with field 48 as identifier)->Q2 SERVER->(Do some processing, gets the destination address using identifier from DB)->Destination Host->(Respond back to the source in reverse)

1 Answers1

0

I'm afraid jPOS doesn't support that out of the box, but you have several ways to achieve that.

You can define a ChannelAdaptor for each possible address, if they are too many you can create some sort of script that generates the deploy files from the database. I guess each destination will have a descriptive name in that database, so you can use that to name the channel adaptor.

Then you can in the participant that gets the destination, obtain also that name. Then you put in the context that destination and use your own logic or the QueryHost participant as described in the section 9.8.4 of the jpos programming guide.

If you don't have a name in the db, then you can use your own naming and defining a mapping in some properties or xml file. Also you can use the destination address as the very name of the channel (preferable prepended by some prefix) if you don't have a better way.

Other approach (I don't know if better or worst but inclined to worst) could be to dynamically create a channel to send the message in a custom participant and not using ChannelAdaptor at all. This would require more java logic and less configuration, also you would lose the benefits of using standard components.

This are just two options I thought right away but may be other options I'm missing. I strongly suggest going the first path, with a possible script that updates the channel adaptor descriptor files if the destination table is too variable or too big (the second I doubt, but just in case I mention).

Basically you are writing a sort of big gateway, so if you didn't already read the jpos gateway tutorials (the wo first) please read them and you will understand how to glue you found in sections 9.8.*. You will base your code in the SelectDestination participant.

Andrés Alcarraz
  • 1,570
  • 1
  • 12
  • 21
  • This application, basically will be Inter-bank fund transfer, wherein 200+ members will be interacting and passing financial messages to each other. I even don't have issue creating multiple config files. The only concern is the routing of message dynamically based on the identifier which is there in the message itself. Since i cannot create server.xml for each and every member as it will be centralized and all the members will connect to centralize switch (this service) which will route the receiving member based on the field 48 (act as destination member identifier). – Diwas Sapkota Jan 31 '18 at 04:27
  • I went through the referred document and seems 9.8.x section will probably a clue for me but i am not able to understand it fully to develop further and the probable path to implement the same. – Diwas Sapkota Jan 31 '18 at 04:30
  • Hi, I added the reference to the gateway tutorial where you understand 9.8.* deeper by examples. Also I suggest you to read all the relevant chapters in the guide. It's jpos 101 and you need to understand correctly all the components that are available to you to build upon them. I also suggest that if you have a question about how to configure some participant or other component please ask it as a new question, but the info is all there. I hope this lead you in the right path. – Andrés Alcarraz Jan 31 '18 at 10:02