Author |
Message
|
rsmile |
Posted: Thu Feb 21, 2008 5:55 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
Vitor Said:
Quote: |
Which is still too short |
now how much should I have as length? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:07 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Vitor wrote: |
the MsgId is NOT a character field. Attempts to treat it as such will only accelerate your slide towards doom! |
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:12 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
jefflowrey wrote: |
What requirement are you trying to fulfill, that you're trying to set these? |
Indeed, I asked as well... _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 6:16 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
I need to update the MsgId according to external information that comes from the message.Thats the reason I need this. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:18 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rsmile wrote: |
I need to update the MsgId according to external information that comes from the message.Thats the reason I need this. |
No, no, no, no, no!
Do NOT put business information in the MsgId!
This is bad, bad, bad, bad, bad.
If you need to carry information from the message in the header use the RFH2. It's what the user area is intended for. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 6:26 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
The situation is it that I have a set of disconnected message flows that need to use the same message again & again.
We would be storing the entire message into the DB & apply the headers according to the values that we get from the DB.
This is not application logic.
Also I'm trying with MsgId but actually need to update CorrelId.
As part of my test flows I'm trying to update MsgId, this is not intentional. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 6:29 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
could you help me updating the correlation ID. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:40 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rsmile wrote: |
could you help me updating the correlation ID. |
You should not be updating the CorrelId with anything that's not the original message id.
Hence use something like:
Code: |
SET OutputRoot.MQMD.CorrelId = InputRoot.MQMD.MsgId |
in the original flow and ensure none of the others change it, marking the message uniquely as it passes through the flows.
Possible a question for a separate thread, but what do you mean by "apply the headers"? Apply the headers to what? And how can this be anything other than application logic? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 6:42 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
Vitor,thank you for your inputs
cant we have a correlation ID that is of our custom format which is other than the msgID? |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 21, 2008 6:45 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jefflowrey wrote: |
What is the proper length for an MQMD.CorrelID field?
What is the proper length for a hex character representation of a binary string of that length? |
These are TWO questions, with TWO answers.
EDIT: You will have problems using this design. You have been warned. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rsmile wrote: |
cant we have a correlation ID that is of our custom format which is other than the msgID? |
Yes - it causes problems which I've been alluding to and have been discussed on the board as I said. There's also very few good reasons for doing it and none of those reasons are apparent in the scenario you've described. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 6:51 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
Ok, I will take it to the design people.
But how can we do it if we have a good reason?
 |
|
Back to top |
|
 |
Vitor |
Posted: Thu Feb 21, 2008 6:56 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
rsmile wrote: |
But how can we do it if we have a good reason? |
The problem (which I suspect is because you're trying to put business data in it) is you're treating it as character. It's not. It's a byte array.
Emphaise that point to your design people. It will not behave as they think it will, especially if you have, or ever have in the future, a multi-platform environment (either in house or to external partners).
Use the RFH2.  _________________ Honesty is the best policy.
Insanity is the best defence.
Last edited by Vitor on Thu Feb 21, 2008 6:57 am; edited 1 time in total |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 21, 2008 6:57 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Yes, it's possible to do.
Yes, you have all the information you need to do it.
Either directly in this thread, or within ten minutes of effort on your part to either search and read more, or think and try more. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
rsmile |
Posted: Thu Feb 21, 2008 7:23 am Post subject: |
|
|
Apprentice
Joined: 13 Feb 2008 Posts: 38
|
Now I need to update the group Id also.
But how can we create a byte array as a field? |
|
Back to top |
|
 |
|