Author |
Message
|
nab054371 |
Posted: Tue May 15, 2007 9:52 am Post subject: Problem with Application segmentation |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
I got a JAVA MQ API application which is splitting a 4.4 MB message into 2.2 MB each, due to sending/receiving application constraints.
I checked to make sure that the message is being split into two segments of 2.2 MB each and put on the MQInput node of a message flow.However after processing these segments the message flow is sticking it on the output queue with two segments ,first one 4 MB and the second 0.4 MB.I am not sure what would be triggering this change in segment sizes?
Here's the options set on JAVA API for application segmentation:
qMessage.setVersion(MQC.MQMD_VERSION_2);
qMessage.messageFlags = MQC.MQMF_SEGMENT | MQC.MQMF_SEGMENTATION_ALLOWED; -- for first segment.
qMessage.messageFlags = MQC.MQMF_LAST_SEGMENT | MQC.MQMF_SEGMENTATION_ALLOWED; -- for second/last segment.
qPmo.options = MQC.MQPMO_LOGICAL_ORDER;
MQOutput node on the message flow has "segmentation allowed" checked.
thanks |
|
Back to top |
|
 |
nab054371 |
Posted: Tue May 15, 2007 10:04 pm Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
|
Back to top |
|
 |
marcin.kasinski |
Posted: Tue May 15, 2007 10:55 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
If you would liek to use "segmentation by QMGR" yoy have to set MQMF_SEGMENTATION_ALLOWED flag only.
Code: |
...
message.messageFlags=MQC.MQMF_SEGMENTATION_ALLOWED;
queue.put(message,pmo);
... |
_________________ Marcin |
|
Back to top |
|
 |
Nigelg |
Posted: Wed May 16, 2007 12:19 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
I expect the MAXMSGL on the queue is set to 4Mb. The qmgr always creates segments of the maximum size until the last segment. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 12:23 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
I do not wanna user segmentation by QMGR.
Nigelg - Are you saying I need to cut down the MAXMSGL on my queue to 2.2 MB.Do you know of any IBM documentation supporting this thought??? |
|
Back to top |
|
 |
Nigelg |
Posted: Wed May 16, 2007 5:25 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
In the APR, MQMD, MsgFlags, it discusses the way that the qmgr segments a msg. _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 5:31 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
could u pls help me get to this APR.I have looked at a couple of IBM documentations and they dont seem to mention any bout this. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 5:48 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nab054371 wrote: |
could u pls help me get to this APR.I have looked at a couple of IBM documentations and they dont seem to mention any bout this. |
APR = Application Programming Reference. It's in the InfoCentre, links to which are peppered through the forum.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 6:01 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
thanks.I have already looked at the APR and no where does it corroborate Nigeleg's thoughts.In fact I looked up an example in "MQ Programming examples" and it seems to ,match up with what I have been trying.
thanks |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 6:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nab054371 wrote: |
thanks.I have already looked at the APR and no where does it corroborate Nigeleg's thoughts. |
Really? My copy of the APR contains the following quote:
Quote: |
Segments generated by the queue manager might be of unequal length. |
The queue manager has a minimum limit on segment size (described on the same page) and rules for segmentation by format, but the upper limit is the maximum message length. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 6:11 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
true.But why do I care bout the max message length,my segment length should not exceed 2.2MB |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 6:54 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
nab054371 wrote: |
true.But why do I care bout the max message length,my segment length should not exceed 2.2MB |
You don't care about max message length, the queue manager does. It will fill each message with as much as will fit. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 6:56 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
ok.but the documentation that you provided does not confirm this!I have not seen IBM documentation verifying this newhere so far!
Also if that is the case,then what is the whole purpose of application segmentation? I thought application segmentation was to he
lp synch up message length with application supported buffer length?
Check this out:
http://www.redbooks.ibm.com/redbooks/pdfs/sg245214.pdf
page 68,in fact it stresses on additional flexibility in defining segment boundaries.. |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 7:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Your reference refers to application segmentation, where you're quite right. I'm talking about system segmentation, which AFAIK is what the broker uses when the MQOutput node is set to segment. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
nab054371 |
Posted: Wed May 16, 2007 7:16 am Post subject: |
|
|
Disciple
Joined: 15 Nov 2006 Posts: 173
|
gotcha..
well here'smy problem,I tried not checking segmentation on MQOUTPUT ,but then it errors out!Any ideas? |
|
Back to top |
|
 |
|