cancel
Showing results for 
Search instead for 
Did you mean: 

Single source sending data through multiple messages to a single reciever

Former Member
0 Kudos

Hi all,

I am trying to implement the below scenario:

- I am reading from table1 in a database using a sender channel1. Based on data retrieved, I perform a JDBC lookup on table2 (in same d/b) using a reciever channel2 in an UDF of a message mapping1.

- The data retreived from table2 is mapped to an intermediate format1. A mapping between the intermediate format and target message type1 is performed and message is sent to the recieving system using a reciever channel3.

- Now, I need to map data retrieved from table2 to different target message types1,2,3.. based on some criteria and send it to the same reciever. I intend to use a different target message type and intermediate format for every kind of data obtained from table2 and a corresponding mapping.

I plan to do this without using a BPM. Is it possible? If yes, then are the 3 communication channels sufficient to achieve this or do I need to have more communicatin channels?

Any help would be appreciated.

Thanks,

Amit

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Tarang for the suggestions!

Is it possible to have multiple join queries in the JDBC adapter? This is because I need to query multiple tables(not just table2) based on data obtained from table1.

Former Member
0 Kudos

Hi Amit,

Yes it is possible, In general how you can write the SQL queries to fetch the data from the databse, those all queries we can write here.

Regards

Ramesh

former_member206760
Active Contributor
0 Kudos

yes you can fetch..

you data structure would be like..

row o...un

+f1

+f2

+f3

where f1 , f2 etc can be from different tables

former_member206760
Active Contributor
0 Kudos

This is pretty straight forward...

change your design as folllowing :

1. as you have both table 1 and 2 in the same database , you can directly write a join query to pick data from both the tables . this can be specified in the sender jdbc adapter

so your source data type would be like

row..0..un

+f1(field from table 1)

+f2( field from table 2)

+f3(field from table 2)

2. now just create 3 seperate mappings

mapping 1 = between source structure given above and target MT1

mapping 2= b/w source struc given above and target MT2

mapping 3 = b/w source struc given above and target MT3

3. use 1 receiver determincation ...1 interface detemination where you keep on adding the message interfaces and interface mapings created above..

4. use 3 receiver agreemetns