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 » Dont flush my queue

Post new topic  Reply to topic
 Dont flush my queue « View previous topic :: View next topic » 
Author Message
Jeffrey P
PostPosted: Fri Oct 10, 2003 6:07 am    Post subject: Dont flush my queue Reply with quote

Novice

Joined: 27 Aug 2003
Posts: 20

I've noticed that when restarting the MQSeries service that the queue gets flushed. I'm worried about this because servers do have to re-booted at times and if the queue empties each time, well, thats bad. Im thinking there has to be a setting somewhere but not sure. Any help would be appreciated. Thanks.
_________________
Jeff
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 10, 2003 6:13 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

The queue will only get "flushed" at server restart if all the messages in it are non persistant.

Note that it is possible to have non-persistant messages in a queue that is marked 'persistant', and vice-versa. The queue property is merely the 'default' value - overriden by whatever the application decides.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Jeffrey P
PostPosted: Fri Oct 10, 2003 6:26 am    Post subject: Reply with quote

Novice

Joined: 27 Aug 2003
Posts: 20

So this is just an option to set in the open options when creating the MQQueue?
_________________
Jeff
Back to top
View user's profile Send private message
Jeffrey P
PostPosted: Fri Oct 10, 2003 6:41 am    Post subject: Reply with quote

Novice

Joined: 27 Aug 2003
Posts: 20

Sorry to keep bugging.....I just keep finding new stuff to ask after the fact. If it is an open option on the queue, I couldnt find it in the options listed in the documentation. Also, if a queue is set to be persistant, will the messages be removed when they are read? Thanks again.
_________________
Jeff
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 10, 2003 6:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

No. Not really. In JMS it's a property of the Queue object.
Code:
myQ.setPersistance(DeliveryMode.PERSISTENT);
In plain java it's a property of the MQMessage object
Code:
 myMsg.persistance = MQC.MQPER_PERSISTENT


If you aren't setting it specifically in your applications right now, you can probably get away with it by changing your queue definitions (in MQSeries, not your app). This is because your apps are putting messages using the queue defaults.

The persistence of a message is independant of whether you do a destructive get from the queue or not. So yes, unless you open the queue for browsing, your persistant messages will get removed from the queue during reads.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Jeffrey P
PostPosted: Fri Oct 10, 2003 6:59 am    Post subject: Reply with quote

Novice

Joined: 27 Aug 2003
Posts: 20

Sounds great.....another question though. My application puts a message on the queue which I can set that property on. If another application puts a response on the queue, I take it that I can also set that option on the response message, thus averting the loss of the response if while waiting for it there are problems with the service or server. Is that correct? Thanks.
_________________
Jeff
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 10, 2003 7:24 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Yes.

Well. Yes and No.

It's up to the application that actually puts the message on the queue to set this property (either to what it wants or by ignoring it which sets it to the queue default value).

So, yes, the application creating the response can set the persistance of the response to ensure that the response doesn't get deleted if the queue manager gets restarted somehow.

But no, the application receiving the response can't change the persistance of the response message - unless it turns around and puts the response back on the queue (which doesn't make a lot of sense).
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Jeffrey P
PostPosted: Fri Oct 10, 2003 7:31 am    Post subject: Reply with quote

Novice

Joined: 27 Aug 2003
Posts: 20

Thanks for the help. I appreciate it.
_________________
Jeff
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » Dont flush my queue
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.