Author |
Message
|
WBI_user |
Posted: Tue Sep 09, 2008 5:34 am Post subject: Length of input message |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
I need to determine the length of the input message read by the MQINPUT node. I know that a MQGET will return the length of the message in the datalength field. Is that field available to the broker message flow.
I am handling very large messages (up to 70M), I need to know the size of the INPUT to determine what needs to be done inside the flow to reduce memory usage. |
|
Back to top |
|
 |
fde |
Posted: Tue Sep 09, 2008 6:19 am Post subject: |
|
|
Acolyte
Joined: 05 Jul 2007 Posts: 65
|
|
Back to top |
|
 |
broker_new |
Posted: Tue Sep 09, 2008 6:25 am Post subject: |
|
|
 Yatiri
Joined: 30 Nov 2006 Posts: 614 Location: Washington DC
|
1.Convert the input message to ASBITSTREAM(InputBody).
2.Cast it as character and
3.find the length of it |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue Sep 09, 2008 6:36 am Post subject: Re: Length of input message |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi WBI_user,
WBI_user wrote: |
I am handling very large messages (up to 70M), I need to know the size of the INPUT to determine what needs to be done inside the flow to reduce memory usage. |
First please tell us what you intend to do if your message is over the limit ? If we know what you are allowed to do, it would be easier to suggest other ways forward.
Regards. |
|
Back to top |
|
 |
WBI_user |
Posted: Tue Sep 09, 2008 7:32 am Post subject: |
|
|
Partisan
Joined: 07 Aug 2001 Posts: 386
|
Thanks for the quick replies. To be honest, I am still thinking exactly what to do with messages of that size. But I do know that I only have 1G of virtual memory space to use (the default for each of our execution group).
My flow is to insert different tags of a XML message to the DB after some minor processing. This XML input message is variable in length. My flow is also subflow which can be called by other flows after I inserted the necessary data. So I have to use as little memory as possible.
One of the tags of the XML input contains scan images of files or video it can be a few hundred bytes or many Megs. The entire message is of course less than 100M which is the current max size for MQ.
If I can determine the size of the message right after the MQGET perhaps I can make some decision on what to do next. Perhaps I should insert this large field first and drop it from the message tree, than handle the rest of the message instead of doing the DB insert of all necessary field at the end of the flow. Whatever data needed from inside the field can be handled some other way. If the message is small, perhaps I can keep the field in the tree and do all the necessary processing within the flow before I do the final DB insertion. |
|
Back to top |
|
 |
|