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 » Persistence property not working

Post new topic  Reply to topic
 Persistence property not working « View previous topic :: View next topic » 
Author Message
shindeashish
PostPosted: Mon Nov 07, 2005 1:17 am    Post subject: Persistence property not working Reply with quote

Novice

Joined: 06 Oct 2005
Posts: 16

We are using MQ-JMS for sending messages to client.
The persistence property is set to NON_PERSISTENT.
However the message after being read at client side still persists in the queue, resulting in queue getting full.
Is there any queue setting which specifies that all messages on queue are persistent??
Let me know if anything is wrong?
The code for sending message is as below:
Code:

responseQueue = queueManager.accessQueue( responseQueueName
    .substring( responseQueueName,
    MQC.MQOO_OUTPUT );

mqMessage = new MQMessage();
mqMessage.persistence = MQC.MQPER_NOT_PERSISTENT;
mqMessage.priority = byteMessage.getJMSPriority();
System.out.println( message.getJMSMessageID() );
mqMessage.messageId = this.decodeHex( message.getJMSMessageID()
    .substring( 3 ).toCharArray() );
System.out.println( "Message Created " + message );
System.out.println( " mqMessage.messageId ["
    + mqMessage.messageId + "]" );               

mqMessage.writeBytes( responseMessageBody.toString() );
mqPutMessageOptions = new MQPutMessageOptions();

responseQueue.put( mqMessage, mqPutMessageOptions );

System.out.println( "Message Put  in Queue" );

queueManager.commit();

System.out.println( "Commit called on QM" );

queueManager.disconnect();
Back to top
View user's profile Send private message
shindeashish
PostPosted: Mon Nov 07, 2005 3:04 am    Post subject: Reply with quote

Novice

Joined: 06 Oct 2005
Posts: 16

Actually the client application which gets the message is doing a BROWSE on the queue to get the message.We are also using channels for the same as queue managers are different.
We are receiving the message on client side and are able to read it, hence client is working properly.
I have also set the expiry time using MQMessage.expiry, however the message is not collected by queue manager for disposal.
Are there any circumstances under which the message remains in queue
after being read from queue??
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Nov 07, 2005 3:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

See the previous post.... the client application should NOT be doing a MQGET with BROWSE. BROWSE means:

"read the message but leave it on the queue".

Remove the BROWSE option.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Persistence property not working
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.