Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8280815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:48:58+00:00 2026-06-08T09:48:58+00:00

I found this code to enumerate a list of queues for a QueueManager. It

  • 0

I found this code to enumerate a list of queues for a QueueManager.
It works, but I see a lot of System Queues, and even channel names in the list it provides. Is there some property I can test to see if it is a “normal” user-defined queue?
ObjectType, QueueType, Usage seemed to always give same values for every queue-name.

            // GET QueueNames - this worked on 07/19/2012 - but returned a lot of system queue, and unclear how to separate user queues from system queues. 
            PCFMessageAgent agent = new PCFMessageAgent(mqQMgr);

            // Build the query request.
            PCFMessage requestMessage = new PCFMessage(CMQCFC.MQCMD_INQUIRE_Q_NAMES);
            requestMessage.AddParameter(MQC.MQCA_Q_NAME, "*");

            // Send the request and retrieve the response.
            PCFMessage[] responses = agent.Send(requestMessage);

            // Retrieve the values requested from the response.
            string[] queueNames = responses[0].GetStringListParameterValue(CMQCFC.MQCACF_Q_NAMES);
            //string[] objType = responses[0].GetStringListParameterValue(CMQCFC.MQIACF_OBJECT_TYPE);

            int loopCounter = 0;
            foreach (string queueName in queueNames)
            {
                loopCounter++;
                Console.WriteLine("QueueName=" + queueName);
                try
                {
                    mqQueue = mqQMgr.AccessQueue(
                             queueName,
                             MQC.MQOO_OUTPUT                   // open queue for output
                             + MQC.MQOO_INQUIRE              // inquire required to get CurrentDepth 
                             + MQC.MQOO_FAIL_IF_QUIESCING);   // but not if MQM stopping


                    Console.WriteLine("QueueName=" + queueName +
                                      " CurrentDepth=" + mqQueue.CurrentDepth +
                                      " MaxDepth=" + mqQueue.MaximumDepth + 
                                      " QueueType=" + mqQueue.QueueType +
                                      " Usage=" + mqQueue.Usage
                                      );
                }
                catch (MQException mex)
                {
                    Console.WriteLine(mex.Message);
                }

            }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:48:59+00:00Added an answer on June 8, 2026 at 9:48 am

    For me your sample code lists only queues, no other objects but yes it lists all queues. You can add another filter requestMessage.AddParameter(MQC.MQIA_Q_TYPE, MQC.MQQT_MODEL); to list only model queues. Other values available for MQC.MQIA_Q_TYPE are MQC.MQQT_LOCAL, MQQT_ALIAS, MQQT_CLUSTER and MQC.MQQT_REMOTE.

    All system or predefined queue names begin with SYSTEM. So you could probably use this string filter out predefined queues after listing. Also if you look at a queue definition, there is DEFTYPE attribute, system defined queues have value of PREDEFINED. But I could not add a third parameter to filter queue names by DEFTYPE. I got 3014 reason code.

    HTH

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this code for alphanumeric check (Letters, numbers, spaces or underscores) but I
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still
I found this code in some website, and it works perfectly. It validates that
I found this code on the internetz, it checks the current page url; function
i found this code -(NSString *) genRandStringLength: (int) len { NSMutableString *randomString = [NSMutableString
I found this code snippet to retrieve the title from a YouTube video and
I found this code in the internet and I modified it for my use,
i found this code: protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); HwndSource hwndSource =
I found this code using Google. private int RandomNumber(int min, int max) { Random
i found this code at activestate, it takes a string and prints permutations of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.