Вы находитесь на странице: 1из 4

LAB 2:

Working on local queue:


Altering a Queue name:
We cant alter a queue name once created. Need to delete it and recreate a new one.
Create a queue named RAJ.TESTQ,
But mistakenly, I have create RAJ_TESTQ

Note: In RUNMQSC mode, all letters will be converted to capital form automatically,
unless they have been specified in quotes.

We are trying to change the Queue name using alter command of runmqsc.
Alter command is used to change the MQ objects attributes/properties as required.
Altering a queue name is not possible.

We need to delete the earlier queue.

Again create a local queue with right name.

Copying a Queue definition to another one:


Check the default value of maxdepth for any new queue created, it is 5000. this value is
copied from SYTEM.LOCAL.DEFAULT.QUEUE(we will learn about these in further
tasks)

I am altering the RAJ.TESTQ to hold only 10 messages in it. The 11th message will not
be placed in that queue by queue manager. We have to use alter command to make
the changes.

Check the RAJ.TESTQ Maxdepth value, now its changed from 5000 to 10.

I want to create another queue RAJ.TESTCOPY with same maxdepth as 10. then I have
typed below command. But it is wrong syntactically, see what MQ suggested me here
It shows all the optional values for each queue attribute & command syntax.

Looking at the above suggestion I have corrected myself by giving command as below.
And I have successfully created a new queue with old queue attributes.

Check the new queue Maxdepth value; it also stores only 10 messages.

Lets discuss some of important Local queue attributes:


There will be a lot of attributes on queue, representing different value and
purpose of the queue. Some are used in clustering of MQ and some are for monitoring
etc.
We will discuss only few of those attributes, which we needed for this distributed setup

GET
Queue enabled for getting messages or not. We can enable & Disable this
attribute for blocking the application from that respective action.

PUT
Queue is enabled for putting messages or not. We can enable & Disable this
attribute for blocking the application from that respective action.
DESCR
We can give description of the queue, should be in single quotes.

INITQ
Mention the queue name, which stores the trigger messages generated from this
queue triggering.

PROCESS
We will specify process name in this attribute. That process will have the
application details needed for triggering.

CURDEPTH
It will give the number of the messages available in a particular queue.
CRDATE
The date on which the queue was defined (in the form yyyy-mm-dd).
CRTIME
The time at which the queue was defined (in the form hh.mm.ss).

MAXDEPTH
Maximum number of messages can be stored in this queue.

MAXMSGL
Maximum allowable message length in the queue. Eg: 2KB, 2MB, 1MB.

USAGE
A local queue acts as transmission queue or local queue.
If this attribute value is Xmitq, then it acts as transmission queue for remote queue.

Ipprocs
Number of Open connection handles from applications for consuming messages.

Opprocs
Number of Open connection handles from applications for placing the messages
on this queue.

Вам также может понравиться