Author |
Message
|
pcelari |
Posted: Wed Jul 18, 2007 11:03 am Post subject: unexpire msg without using compute node possible? |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I log a copy of each request msg by connecting the out terminal of the MQInput node directly to a MQOutput node. At each midnight, I retrieve the msg and create a volume profile of the day, including response time.
However, the original request msg has MQMD.Expiry set to 10 seconds. I thought it's part of the msg context, so I set Message Context field to None. But it turns out, the msg still expire.
Surly, I can add a computenode and reset with
set OutputRoot.MQMD.Expiry = MQEI_UNLIMITED;
But I don't want to add the extra overhead.
Is there a way to do this without a compute node?
thanks for any insight. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 18, 2007 11:05 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Insert the data into a database, instead. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Wed Jul 18, 2007 11:08 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
jefflowrey wrote: |
Insert the data into a database, instead. |
But that would bring even bigger overhead !
Maybe the only alternative is to write a C program to reset it before putting into the next queue? _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
Lisa |
Posted: Wed Jul 18, 2007 11:14 am Post subject: |
|
|
Master
Joined: 07 Jun 2002 Posts: 287 Location: NJ
|
Quote: |
Surly, I can add a computenode and reset with
set OutputRoot.MQMD.Expiry = MQEI_UNLIMITED;
|
Maybe I'm missing something, but you can add a Compute node in between the MQInput and MQOutput node and change the MQMD.Expiry value.
Lisa |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 18, 2007 11:17 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
pcelari wrote: |
jefflowrey wrote: |
Insert the data into a database, instead. |
But that would bring even bigger overhead ! |
No.
Don't leave the data sitting in a queue all day. Put another flow attached to that queue, that sticks the data into a database.
Ensure that this flow runs in a fast enough time frame to avoid needing to mess with the expiry.
Or look at the User Exits in Broker v6. You could code a user exit (must be in C) to copy data or report on data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Wed Jul 18, 2007 11:29 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
thanks a lot for the insight.
I already have a c program that reset the MQMD.Expiry=MQEI_UNLIMITED, but hesitate to introduce the complexity of trigger, process etc. A user exit seems to be the right solution.
thanks a lot. GM. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed Jul 18, 2007 11:42 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
pcelari |
Posted: Thu Jul 19, 2007 6:28 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
[quote="jefflowrey"]
And it won't let you change the exipry.
quote]
Now I tried to
set OutputRoot.MQMD.Expiry=MQEI_UNLIMITED;
in a compute node, which set it to -1.
However, upon leaving the node, MQMD.Expiry gets restored to the original setting. Why this behavior? _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 19, 2007 6:37 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Because, maybe, you didn't set the MQOutput node options in such a way to allow the PUT to set Expiry.
Or you set Expiry on the MQMD when it may have needed to be set on Properties. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Thu Jul 19, 2007 7:38 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
No. that's not the case. They got reset to original value right after the compute node, no matter what I set in the Messag Context field of the MQOutput node.
Anything else could be at work?
It seems only a seperate program can manipulate such field.
thanks, _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 19, 2007 8:03 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
I am only half wrong.
It is not the Message Context that's the problem.
ExpirationTime is a field in Properties tree. All fields in Properties tree override individual fields in other headers - like MQMD.Expiry.
So you need to set OutputRoot.Properties.ExpirationTime instead of OutputRoot.MQMD.Expiry. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Thu Jul 19, 2007 8:28 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
I did, here's my code:
set OutputRoot.MQMD.Expiry = -1
set OutputRoot.Properties.ExpirationTime= TIMESTAMP '2999-12-31 23:59:59';
But it behaves the same.
thank you pointing out the overriding effect of Properties on MQMD. _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 19, 2007 8:30 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
The value of Expiry on MQMD will be overwritten with the value of ExpirationTime.
I do not, therefore, think you want to set ExpirationTime to a timestamp. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
pcelari |
Posted: Thu Jul 19, 2007 8:50 am Post subject: |
|
|
Chevalier
Joined: 31 Mar 2006 Posts: 411 Location: New York
|
But OutputRoot.Properties.ExpirationTime is of type TIMESTAMP. and with the following statement I set it to a thousand year from now.
set OutputRoot.Properties.ExpirationTime= TIMESTAMP '2999-12-31 23:59:59';
Am I wrong with the setting? _________________ pcelari
-----------------------------------------
- a master of always being a newbie |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Jul 19, 2007 8:58 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
|
Back to top |
|
 |
|