|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Deleting large message (12MB) from queue using Java MQ API |
« View previous topic :: View next topic » |
Author |
Message
|
tso0rxp |
Posted: Wed Feb 09, 2005 10:40 am Post subject: Deleting large message (12MB) from queue using Java MQ API |
|
|
 Voyager
Joined: 07 Jan 2002 Posts: 85
|
****************
Issue:
****************
Need help "Deleting large message (12MB) from Queue using Java MQ API"
****************
Detail:
****************
We have customized a IBM MQ Sample program that browses/deletes the message from a Queue using Java. We use MQ series version 5.3 (CSD06) and JDK1.3.1.
The program is intended to take a Queue name, Queue manager, File to be created, Group ID matching String and retreive the messages in Groups.
The client program works well with messages under 12 MB, however when the message is 12 MB then the Step 2>> below is executed and the program just ends.
I have added code (print statements ) to display the line above and below the Step 3>>. The print statement following the Step 3>> (MQMessage.get()) never executes.
Note that I have tried to capture any exceptions, nothing is displayed. Also we verified the QMGR and Channel (MSGLEN) settings are allowed to work for messages upto 100MB.
****************
Psuedo code:
****************
While <<No more messages>>
1>>>Browse from the beginning of the Queue for matching Group ID.
2>>>Read the matched message and write it to a File.
3>>>If user input to "delete the message" - Delete the message under the cursor (Failing Step)
4>>>Go to the next message
Capture all possible MQ and File/IO exceptions along each step.
****************
Real Code for Step #3:
*****************
Code: |
if ( brws_dlt_opt.compareToIgnoreCase(new String("delete")) == 0)
{
...
gmo.options = MQC.MQGMO_WAIT + MQC.MQGMO_CONVERT + MQC.MQGMO_MSG_UNDER_CURSOR;
gmo.waitInterval = 15000;
retrievedMessage.clearMessage();
retrievedMessage.correlationId = MQC.MQCI_NONE;
retrievedMessage.messageId = MQC.MQMI_NONE;
System.out.println("Deleting message " );
try {
// lDefaultQueue.get(retrievedMessage, gmo,17241024); Also tried this - didn’t work
lDefaultQueue.get(retrievedMessage, gmo);
System.out.println("After the get");
}
Catch (MQException ex) {
System.out.println("MQ exception: CC = " + ex.completionCode + " RC = " + ex.reasonCode);
}
|
Thank you, _________________ Bob Perry
MQ Administrator |
|
Back to top |
|
 |
tso0rxp |
Posted: Thu Feb 10, 2005 5:37 am Post subject: |
|
|
 Voyager
Joined: 07 Jan 2002 Posts: 85
|
22 reads and no suggestions or comments?  _________________ Bob Perry
MQ Administrator |
|
Back to top |
|
 |
jefflowrey |
Posted: Thu Feb 10, 2005 5:50 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Increase the heap size of your JVM. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
tso0rxp |
Posted: Thu Feb 10, 2005 7:49 am Post subject: |
|
|
 Voyager
Joined: 07 Jan 2002 Posts: 85
|
That did it, Jeff. Thanks! _________________ Bob Perry
MQ Administrator |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|