Get list of Private Queues using JavaScript
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2019
11:15 AM
05-07-2019
11:15 AM
Get list of Private Queues using JavaScript
I just need to get a list of the current private message queues (MSMQ). Not the actual messages, just the name of the queues. Preferably in JavaScript. It doesn't appear to be anywhere in the registry. I also tried looking through the available functions in "dotNET" and "dotNET.System" but don't really see anything about messaging. Is there a way to do this?
Solved! Go to Solution.
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2019
03:00 AM
05-08-2019
03:00 AM
Hi,
Does this helps?
https://support.smartbear.com/testcomplete/docs/reference/program-objects/storages/registry.html
With Regards
Vallalarasu Pandiyan
https://www.linkedin.com/in/vallalarasupandiyan/
Vallalarasu Pandiyan
https://www.linkedin.com/in/vallalarasupandiyan/
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2019
03:06 AM
05-08-2019
03:06 AM
Hi,
https://stackoverflow.com/questions/1228684/how-can-i-get-all-the-available-messages-on-a-msmq-queue
https://www.google.com/search?q=MSMQ+get+a+list+of+the+current+private+message+queues
Does this help?
Regards,
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2019
11:51 AM
05-08-2019
11:51 AM
I figured it out! Had to query the WMI object:
// Query WMI for Message Queues var privateQueueNames = []; var Locator = getActiveXObject("WbemScripting.SWbemLocator"); Locator.Security_.ImpersonationLevel = 3; var wmiobj = Locator.ConnectServer(".", "root\\cimv2"); var queryresults = wmiobj.ExecQuery("Select * from Win32_PerfRawdata_MSMQ_MSMQQueue Where Name like \"%private%\""); // Push all queue names into privateQueueNames for( var items = new Enumerator(queryresults); !items.atEnd(); items.moveNext() ) privateQueueNames.push(items.item().Name); // Convert the function elements into strings privateQueueNames = privateQueueNames.join(); privateQueueNames = privateQueueNames.split(","); Log.Message(privateQueueNames);
