Author |
Message
|
sebastia |
Posted: Tue May 15, 2007 3:39 pm Post subject: Segmentation (automatic) |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
In manual "MQ v 6.0 Fundamentals", chapter "4.6.7" we can read :
"Messages that are larger than 100 MB can be broken into smaller segments.
Segmentation when sending messages and reassembly of the whole message when receiving messages can be performed manually by an application or automatically by a queue manager"
What is the way to make it happen
"AUTOMATICALLY BY A QUEUE MANAGER " ???
S. |
|
Back to top |
|
 |
Gaya3 |
Posted: Tue May 15, 2007 10:39 pm Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
By Default its not segmented,
You can segment in the application part and send it to the queue manager.
Thanks and Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Tue May 15, 2007 11:01 pm Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
You have two options-
1. Manually
divide your message into smaller parts and send it as few messages.
Code: |
...
MQPutMessageOptions pmo= new MQPutMessageOptions();
pmo.options=MQC.MQPMO_FAIL_IF_QUIESCING |MQC.MQPMO_SYNCPOINT;
MQMessage mqmessage=new MQMessage();
mqmessage.format=MQC.MQFMT_STRING;
mqmessage.messageType = MQC.MQMT_REQUEST;
mqmessage.writeString(message1);
mqmessage.messageFlags=MQC.MQMF_SEGMENT;
queue.put(mqmessage, pmo);
MQMessage mqmessage2=new MQMessage();
mqmessage2.format=MQC.MQFMT_STRING;
mqmessage2.messageType = MQC.MQMT_REQUEST;
mqmessage2.writeString(message2);
mqmessage2.messageFlags=MQC.MQMF_LAST_SEGMENT;
mqmessage2.groupId=mqmessage.groupId;
mqmessage2.messageSequenceNumber=mqmessage.messageSequenceNumber+1;
mqmessage2.offset=message1.length();
queue.put(mqmessage2, pmo);
qMgr.commit();
...
|
2. Ask QMGR to divide this message for you :
Code: |
...
message.messageFlags=MQC.MQMF_SEGMENTATION_ALLOWED;
queue.put(message,pmo);
... |
_________________ Marcin |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 12:05 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr marcin : I want the QM to do it for me.
Do you mean I can MQPut() a 125 GB message,
and Queue Manager will split it into 10 MB chunks,
send it over the channel,
and un-split it on the other side,
so the receive application will see
again a 125 GB one-piece message ? |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 12:11 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Sorry, I meant 100 MB chunks ...
suposing ... MAXMSGL(104857600) +
Thanks. S. |
|
Back to top |
|
 |
marcin.kasinski |
Posted: Wed May 16, 2007 12:11 am Post subject: |
|
|
Sentinel
Joined: 21 Dec 2004 Posts: 850 Location: Poland / Warsaw
|
sebastia wrote: |
mr marcin : I want the QM to do it for me.
Do you mean I can MQPut() a 125 GB message,
and Queue Manager will split it into 10 MB chunks,
send it over the channel,
|
yes.
sebastia wrote: |
and un-split it on the other side,
so the receive application will see
again a 125 GB one-piece message ? |
No. On remote side you will have 10 messages.
You can get it one by one or you can ask QMGR to split it for you into one big message and receive entire message by one GET.
Code: |
...
MQGetMessageOptions gmo = new MQGetMessageOptions();
gmo.options = MQC.MQGMO_FAIL_IF_QUIESCING|MQC.MQGMO_COMPLETE_MSG;
queueIN.get(retrievemqmessage, gmo);
...
|
PS Memory management is another thing which you should consider. _________________ Marcin |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 12:58 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
mr marcin - so if I code the MQGet() the way you tell me,
I can receive only one large message ...
Very good.
Memory - yes, we know about the problem.
The GB size was just a sample value. |
|
Back to top |
|
 |
|