|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
persistent messages issues |
« View previous topic :: View next topic » |
Author |
Message
|
skytorch |
Posted: Wed Jul 31, 2002 9:41 am Post subject: persistent messages issues |
|
|
 Apprentice
Joined: 10 Jun 2002 Posts: 47 Location: New York City
|
Hi,
I've a mq client application sending messages to a persistent queue in a QM on Win2000. I've tried to set both the queue and messages persistent. In either case, the queue file under ..\qmgrs\QM1\.. doesn't increase consistently (it sometimes increases, sometimes not) as the client put in messages. As a result, if I shutdown QM and restart it, I've messages sometimes kept, sometimes lost.
This is in contrary to what I expected. Shouldn't the size of the persistent queue file updated for every put() and get() call ?
This is related a task that in the case of failover, I'll copy this queue file to a cold-standby queue manager directory ..\qmgrs\QM2\.. Then start the standby QM which has identical persistent queue definition. I should be able to see persistent messages recovered. Am I on the right track ?
Thanks in advance.
Sky |
|
Back to top |
|
 |
mrlinux |
Posted: Wed Jul 31, 2002 10:48 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
1) The queue file size doesnt shrink when messages are pulled off, the q file will grow but not shrink unless you restart qmgr or issue clear ql(NAME) or no apps are connected for some period of time and Iam not sure of the time (I have never seen this one work) .
2) As far as persistent messages go, the queue definition doesnt guarntee the message will be persistent. The applicaition has to honor that setting,
putting persistent messages. you can mix persistent messages with non-persistent messages on the same queue the only thing is when you restart the qmgr you will lose the non-persistent one.s _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
Back to top |
|
 |
skytorch |
Posted: Wed Jul 31, 2002 11:37 am Post subject: |
|
|
 Apprentice
Joined: 10 Jun 2002 Posts: 47 Location: New York City
|
Jeff,
Thanks.
That's interesting. Related to what you pointed out:
1. Is the q file supposed to grow for every persistent message coming into the persistent queue or it's something like a grow-able list that will increase size (say double the size) when it's necessary ?
2. If I had a large number of persistent messages flowing through the persistent queue, would the q file be pretty large? If yes, assume at the point of failover from one QM to another QM, there're only a few persistent messages in the queue, do I have to copy a large file just for failover a few messages?
Regards,
Sky |
|
Back to top |
|
 |
PeterPotkay |
Posted: Wed Jul 31, 2002 11:45 am Post subject: |
|
|
 Poobah
Joined: 15 May 2001 Posts: 7722
|
When putting persistent messages, MQ only writes to the log at commit time. So this may explain why you are not seeing a 1 to 1 realtion between PUTS and log size growing. Turn syncpoint off, and MQ will log after each PUT.
I came across this in the MQ Prog Guide manual
(http://publibfp.boulder.ibm.com/epubs/html/csqzal06/csqzal06tfrm.htm)
Quote: |
In WebSphere MQ on UNIX systems, MQSeries for Compaq OpenVMS Alpha,
WebSphere MQ for z/OS, MQSeries for OS/2 Warp, MQSeries for VSE/ESA, and
WebSphere MQ for Windows, a persistent message within the current unit of
work is logged only when the unit of work is committed (and the unit of work
could contain many queue operations).
|
_________________ Peter Potkay
Keep Calm and MQ On |
|
Back to top |
|
 |
nimconsult |
Posted: Wed Jul 31, 2002 9:44 pm Post subject: |
|
|
 Master
Joined: 22 May 2002 Posts: 268 Location: NIMCONSULT - Belgium
|
Some points on log files and queue files:
When you issue a MQPUT of a persistent message, it is written in the log buffers which are flushed asynchronously.
When you issue MQCMIT, or issue a MQPUT or MQGET out of syncpoint, MQ forces a synchronous write to the disk (which ensures the "durability" of your transaction). (This is why designing transactions is a critical task for high-performance applications)
Queue files are always updated asynchronously. The log files are always in advance or equal to the queue content.
This is why in case of restart MQ after a crash MQ performs both a backward recovery (undo the changes of uncompleted transactions) and a forward recovery (make queue file up-to-date according to log file content).
MQ Series manages the queue file size according to internal rules that you cannot predict. You will not see the data file increase or decrease in a predictable way after each MQPUT or MQGET on a queue. _________________ Nicolas Maréchal
Senior Architect - Partner
NIMCONSULT Software Architecture Services (Belgium)
http://www.nimconsult.be |
|
Back to top |
|
 |
mrlinux |
Posted: Thu Aug 01, 2002 3:50 am Post subject: |
|
|
 Grand Master
Joined: 14 Feb 2002 Posts: 1261 Location: Detroit,MI USA
|
Skytorch,
Related to failover, what kind of failover are you talking ????,
If it is like MS Cluster or MC/Service Guard you dont copy files, the whole file system is unmounted and mounted on to the failover server.
PS The Qfile could be 2GB and the queue could be empty. _________________ Jeff
IBM Certified Developer MQSeries
IBM Certified Specialist MQSeries
IBM Certified Solutions Expert MQSeries |
|
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
|
|
|
|