MAXDEPTH Increase the MAXDEPTH property:
We can use "Alter" command in MQSC mode to modify MAXDEPTH property.
ALTER QLOCAL(LOCAL-Q-NAME) MAXDEPTH(NEW-VALUE)
What are the best practices to follow, when we increase queue MAXDEPTH value? OR Things to keep in mind before changing the MAXDEPTH value of a production local queue? Assumption: Below is best applied for production environment changes. For pre-production as its not going to be a business impact, we don’t have to take these many precautions.
A local queue MAXDEPTH can take max value of “999 999 999”. But before we increase, we need to gather below details.
The maximum size of messages expected into this queue. The Avg message size that is expected to this queue. Some statistics like, how good are the messages flow rate into the queue and out of the queue.
We can gather this information from Queue statistics if we have in our environment or we can cross check with an application team or a business analyst.
Let’s try to understand this with Examples: MAXDEPTH --> 1000000
The maximum size of messages expected into this queue:
Max Msg size --> 1MB
The Avg message size that is expected to this queue:
Avg msg size --> 250KB
Some statistics like, how good is the messages flow rate into the queue and out of the queue:
Msg flow Rate --> don’t know
Now let’s ask some questions to our self,
What if receiver application is failed to pick up the messages for a brief period? What if sending application is increased the message rate into the queue and receiver application is not ready to consume fast? What if the queue is full considering the Avg message size for each message? What if Application is putting Max Msg Size messages at any point in time?
MAXDEPTH * Avg Msg Size i.e,
1000000 * 250KB --> 250GB size hard disk storage or space on the storage medium is required. Before this itself, queue manager system may run out of disk space and shutdown.
Few suggested check points before executing in production:
We have to gather mentioned statistics expected from application teams or from queue history.
Engage in a call with application team and ask,is it really necessary to increase the MAXDEPTH size of the queue? Because most of the application team members may not know the repercussions and sometimes, they simply ask to increase the depth to solve some other issue. If increasing the queue MAXDEPTH value, then can we decrease MAXMSGL property of the local queue as a precautionary measure? If it’s really application requirement, then receiver application team should well equip to consume messages instantly or have the things in standby. Engage Linux/UNIX operations team and make sure proper storage is mounted for MQ directory structure. From MQ end, keep special alerts on the queue so that we can acknowledge and work on the queue messages before the situation gets worse. Before we do the changes to queue property, make sure we have all the approvals from our L3 team or client team also for the production environment.
Above are some of the ideas that we can work on, but things may change based on project environment and team dependencies. So do proper analysis and implement.
I am working on multiple middleware products, mostly are Websphere tagged. I love sharing my knowledge and experience with others.
Though occupied mostly with office work, will eke out time to share knowledge across the community. In one line, I am a hardworking and lovable person. :):):)
IBM certified MQ system admin with around 4 years of experience in MQ administration and support. Have worked on multiple projects which made use of MQ platform.
I am a very simple, god fearing, caring, understanding, trustworthy and kind hearted human being. I believe in the motto ‘Live and let live’.
I am fun loving, down to earth and very much Optimist. I love travelling, watching movies, sight-seeing, listening music (love failure songs :P).