Posted: Mon Apr 14, 2003 6:25 am Post subject: Message persistance vs queue persistance
Acolyte
Joined: 24 Oct 2001 Posts: 69 Location: Markham, On. Canada
what exactly is the difference between message persistnace and queue persistance?
I know that a message must be flagged as persistant to survive a qmgr restart, but what happens to a persistant message in a non persistant queue - or a non persistant message in a persistant queue...
Joined: 27 Aug 2001 Posts: 3023 Location: Dallas, TX, USA
You can put persistent messages on queues that are marked with a default persistence of non-persistent. You can also put a non-persistent message on a queue that is marked with a default persistence of persistent. The queue persistence is specified so that you can put messages from an application and specify to use whatever the queue has set. It is one way to keep your developers from having to figure out whether to specify it or not. You might want to look at the MQPER_PERSISTENCE_AS_Q_DEF define.
Don't forget the performance considerations when deturmining persistance.
Since persistant messages require logging they move through the system slower than non persistant messages. So from a performance perspective it is best to define persistance at the message level because it allows MQ to minimize logging even when both persistant and non-persistant data reside on the same queue. This would especially be true for transmit queues because both persistant and non persistant messages would use the same one.
To persist or not is a difficult decision... I think it usually best for applications to track important data and allow for som elevel of recovery...
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