Posted: Thu Nov 07, 2002 1:28 pm Post subject: set Header property
Centurion
Joined: 25 Jun 2002 Posts: 144
Code:
long expiry = 1036705617096L ;
long setTime = 1036705617096L ;
TextMessage tmsg = qSession.createTextMessage();
tmsg.setText("Today is Thursday") ;
tmsg.setJMSExpiration(expiry) ;
tmsg.setJMSTimestamp(setTime) ;
qSender.send(tmsg);
System.out.println("expiry set to "+tmsg.getJMSExpiration());
System.out.println("setTime "+setTime);
System.out.println("get time Stamp "+tmsg.getJMSTimestamp());
whats wrong with above code .. am getting the output as
Quote:
expiry set to 0
setTime 1036705617096
get time Stamp 1036705656850
which is not correct.
Will someone correct me ...pl
Could you check the value of EXPIRY property value on the Queue admin object.
I think you have to set EXPIRY(APP) when you define the Queue Admin object with JMSAdmin tool, so that your application can control the value of Expiry.
I recommend to crosscheck this values directly inside the MQ Message. When you see the message inside the MQ queue, use utilities such as amqbsc ( I might have spelled it wrong) to browse the messages in the queue and then check out the MQRFH2 header.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum