Skip to Content
0
Former Member
Apr 24, 2014 at 11:29 AM

Receiver Time error in adapter Module in PI 7.31

19 Views

Hello Team,

I am trying working on adapter module that accomplish Message id, Sender Interface name,Receiver Interface name sent time and receiver time.

I got all values in my file except receiver time .I have failed to get exact receiver time.

sent time shows as 2014 04 24 05:28:57

receiver time as 1969 12 31 19:00:00

when ever message triggers its shows same receiver time(1969 12 31 19:00:00) ,I have placed my adapter module in JMS and File adapters,but i am getting same time in message receiver time .

Please help me how to get exact message receiver time.

Here is code.

Message msg1=null;

obj=md.getPrincipalData();

msg1=(Message)obj;

msg1=(Message)md.getPrincipalData();

Date date = new Date();//For dynamic date file generation

//time sent

Long timesent=msg1.getTimeSent();

Date sdate = new Date(timesent);

Format Tformat = new SimpleDateFormat("yyyy MM dd HH:mm:ss");

String SentTime=Tformat.format(sdate).toString();

//time receive

Long timerecev=msg1.getTimeReceived();

Date rdate = new Date(timerecev);

String ReceiveTime=Tformat.format(rdate).toString();

Thanks

Ganesh