ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » Deleting large message (12MB) from queue using Java MQ API

Post new topic  Reply to topic
 Deleting large message (12MB) from queue using Java MQ API « View previous topic :: View next topic » 
Author Message
tso0rxp
PostPosted: Wed Feb 09, 2005 10:40 am    Post subject: Deleting large message (12MB) from queue using Java MQ API Reply with quote

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
View user's profile Send private message Send e-mail
tso0rxp
PostPosted: Thu Feb 10, 2005 5:37 am    Post subject: Reply with quote

Voyager

Joined: 07 Jan 2002
Posts: 85

22 reads and no suggestions or comments?
_________________
Bob Perry
MQ Administrator
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Thu Feb 10, 2005 5:50 am    Post subject: Reply with quote

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
View user's profile Send private message
tso0rxp
PostPosted: Thu Feb 10, 2005 7:49 am    Post subject: Reply with quote

Voyager

Joined: 07 Jan 2002
Posts: 85

That did it, Jeff. Thanks!
_________________
Bob Perry
MQ Administrator
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Deleting large message (12MB) from queue using Java MQ API
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.