Author |
Message
|
anjan34 |
Posted: Mon Aug 19, 2002 1:54 am Post subject: JMS Expiration value from a Non-JMS application |
|
|
Newbie
Joined: 19 Aug 2002 Posts: 5
|
Hi,
I am trying to retrieve the JMS expiration value of a message. But i am getting the value as zero(0).
The message has been put into the queue using Base MQ classes. Once i put the message in the queue, i am able to see the expiry time.
But when retrieving the message through JMS i am getting the value as zero(0). From MQ-JMS documentation i found if we are receiving a message from a non-JMS application, there is no MQRFH2. And only those JMS properties that are transmitted in the MQMD can be restored. Also from the same document i found that JMSExpiration is available in MQRFH2 (as "jms.Exp") and it is not available in MQMD field for the incoming messages. Is this the reason for the above behaviour?
Also, is there any way of retrieving the expiration value of the message through JMS where the message has been put using base MQ java class.
Thanks in advance |
|
Back to top |
|
 |
PeterPotkay |
Posted: Thu Dec 12, 2002 9:35 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
We were having the same problem.
One of our apps had no problem, the other one did.
The only differance between the two:
One that works has Weblogic Service pak 2 and the IBM support classes are from 3-29-2.
The one that is having problems has Weblogic Service pak 3 and the IBM support classes are from 8-01-1.
When we updated the IBM support classes to the 3-29-2 ones for the app that was having the problem, the problem went away. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
kolban |
Posted: Mon Dec 16, 2002 9:57 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
From what you say, it sounds like we have two possibilities for Message expiry:
With base MQ (not-JMS), we have the MQMD.Expiry field.
With JMS, we have the jms.Exp field in the RFH2 header
From an IBM JMS implementation perspective, it looks like the MQMD.Expiry field value is not utilized. As such, when a message without an RFH2 arrives on the JMS queue, when retrieved, it has no RFH2 expiration and hence has no JMS expirty value.
What surprises me here is that if this is the case, if a JMS application puts a message to the queue with an expiry value of, say, 10 seconds, that message will NOT be cleaned up by MQSeries but will take an explicit JMS client action to cause its deletion. |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Dec 16, 2002 10:56 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
Kolban,
I have it working. We use the mainframe to send a message to an MQ Queue being monitored by a Message Driven Bean. The mainframe did not produce the RFH2 header inside the message. The MDB only had the MQMD to work with.
Whatever value I set in the mainframe for Expiry in the MQMD in centiseconds was always correctly converted into the JMS milliseconds "time-to-live" field. -1 (Unlimited) in MQSeries land shows up as zero in JMS.
The reverse worked as well. If the JMS app set a value in milliseconds for time to live, we saw that value converted to centiseconds in the MQMD. A JMS app needing Unlimited Expiry would use Zero, which gets converted to -1 in the MQMD. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
anjan34 |
Posted: Thu Jan 02, 2003 11:21 am Post subject: |
|
|
Newbie
Joined: 19 Aug 2002 Posts: 5
|
We are using Websphere 3.5.4 application server. For outgoing messages (sent from JMS) the expiry field is set properly in MQMD header. But the problem is with the incoming message from a Non-JMS to JMS application |
|
Back to top |
|
 |
LearnMQSI |
Posted: Fri Jan 10, 2003 1:26 pm Post subject: Expiration Value |
|
|
 Centurion
Joined: 20 Aug 2002 Posts: 137
|
Hi There,
Can somebody tell me how to code the Expiration value in your application.
I need to send a message with Unlimited Expiration value from Mainframe to Unix platform. On Unix side, we are using Oracle support pack MQPACK for connecting to MQSeries.
Also, the other way, sending an Unlimited Expiration message from Unix to Mainframe.
Thanx for your help |
|
Back to top |
|
 |
PeterPotkay |
Posted: Mon Jan 13, 2003 6:40 pm Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
In the mainframe code, simply move a -1 to the Expiry field prior to the MQPUT. Or use the constant that corresponds to Unlimited Expiry for your programing language. _________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
|