background preloader


Facebook Twitter

What is the best free tool for managing MSMQ queues and messages. Emil's Lost & Found Archive » Retrieving the message count for MSMQ queues. Home > .Net programming, PowerShell, Windows tips > Retrieving the message count for MSMQ queues Sometimes it can be useful to retrieve the number of messages in an MSMQ queue, for example for monitoring.

Emil's Lost & Found Archive » Retrieving the message count for MSMQ queues

However, it’s not immediately apparent how to do it if you google it, so here are my thoughts on the subject. Other blog posts suggest iterating over messages (e.g. Counting Messages in an MSMQ MessageQueue from C#) or doing it using WMI. WMI is the best alternative in my opinion and if you want a quick way of doing it then PowerShell is the easiest: The result will be something similar to this: This can also be done on remote machines: The Get-Credential Cmdlet will display a login dialog which is fine in interactive sessions but if you need to set the credentials in a non-interactive script, then the tip in this blog post might help: PowerShell – How to create a PSCredential object.

This code also uses WMI but this time we do a query rather than enumerate all queues. /Emil. How to modify the MachineQuota for MSMQ in Domain Mode through code - Paul King's BLOG. Our support website does a pretty good job for telling you how you can modify the MachineQuota setting for MSMQ here.

How to modify the MachineQuota for MSMQ in Domain Mode through code - Paul King's BLOG

Unfortunately, if you need a way to do this programmatically and your installation happens to be in "Domain Mode", then there really isn't enough information here. "What are MSMQ's limits?" If I had a farthing for every time... - MSMQ from the plumber's mate. To really get into the right mind-set for discussing MSMQ's limits I think we should first read the words of that great man Douglas Adams: "Space is big - really big - you just won't believe how vastly, hugely mind-bogglingly big it is.

"What are MSMQ's limits?" If I had a farthing for every time... - MSMQ from the plumber's mate

You may think it's a long way down the road to the chemist, but that's just peanuts to space. " And so it is with MSMQ. The design of MSMQ, or more accurately the underlying operating system, means it can manage more messages than most companies will send in their lifetime. Signing off - MSMQ from the plumber's mate. Transactional logging outside of transactions. I’ve constructed a central logging system for a solution that involves routing and processing messages on multiple private queues (MSMQ) using WCF.

Transactional logging outside of transactions

Within a contract method of a WCF service, I do some logging. Here’s some abbreviated code to illustrate: The ReceiveMessage is fired whenever a new message gets placed onto the queue that my service is monitoring. None of this is earth shattering. So, the full chain of events is… Finally! Microsoft added MSMQ to Server Core in Windows Server 8 « Buvy's Banterings. MSMQ Info. Bryan Wheeler, Director Platform Development at “Udi Dahan is the real deal.


We brought him on site to give our development staff the 5-day “Advanced Distributed System Design” training. The course profoundly changed our understanding and approach to SOA and distributed systems. Consider some of the evidence: 1. Months later, developers still make allusions to concepts learned in the course nearly every day 2. One of our developers went home and made her husband (a developer at another company) sign up for the course at a subsequent date/venue 3.

Too Many Private Queues - MSMQ Information and Troubleshooting Blog. Message Queuing (MSMQ) Forum. MSMQ from the plumber's mate. MSMQ Diagnostics "Send test messages" and "Tracking" are greyed out - MSMQ from the plumber's mate. MSMQQueueInfo.PathName. The set of valid characters for the queue path name varies, depending on the version of Message Queuing that is creating the queue.


TCP ports, UDP ports, and RPC ports that are used by Message Queuing. The following ports are used for Microsoft Message Queuing (MSMQ) operations:TCP: 1801RPC: 135, 2101*, 2103*, 2105*UDP: 3527, 1801The following is for Message Queuing 3.0 and later: While Message Queuing uses the same ports that are used in earlier versions of MSMQ, Message Queuing also introduces TCP port 389.

TCP ports, UDP ports, and RPC ports that are used by Message Queuing

TCP port 389 must be open for MQIS queries to be made directly against Active Directory. Additionally, HTTP messaging in Message Queuing 3.0 and later requires that the port specified for the Message Queuing virtual directory be open. C# - MSMQ: Remote access in transactional context. WCF and MSMQ—Take a Message. He inherent advantages to introducing queues into an application architecture are well understood.

WCF and MSMQ—Take a Message

Queues, when used properly, can: Increase application robustness, as clients can send messages even when services are not running. Increase application scalability, because multiple service instances can be used to process messages from a single queue. Improve client responsiveness, which eliminates the need for clients to wait for a response from the service. Reduce decencies between client and services, because all communication is indirect via queues. Ensure the durability of messages, because they can survive service and system failures.

Reliable Messaging with MSMQ and .NET. Duncan Mackenzie Microsoft Developer Network Revised February 2002 Summary: This article describes how to use recoverable messages, transactions (alone or combined with database transactions), and acknowledgements with MSMQ and the Microsoft .NET Framework. (30 printed pages)

Reliable Messaging with MSMQ and .NET

How do I get transactional remote receives with MSMQ? - MSMQ from the plumber's mate. It is not always efficient for business reasons to implement a classic push system - "send remote, read local" - and a pull mechanism may instead be required - "send local, read remote".

How do I get transactional remote receives with MSMQ? - MSMQ from the plumber's mate

The downside to this has been that the "read remote" couild not be transactional which makes the operation unreliable and prone to data loss. Transactional Remote Receive "However, there are cases in which a transactional remote receive is necessary. For example, a single message queue receives work orders, and applications on other computers read these work orders and process them. If one of the applications is unable to process a work order, we want the work order to be returned to the queue, rather than dropped.

" So, how can you get transactional remote receives with MSMQ? How to tell if a remote MSMQ queue is transactional? - MSMQ from the plumber's mate. [[Corrected December 17th, 2009, with input from Jolie Boushey]] This isn't going to be easy. There are two major obstacles to cope with Private queues are, by definition, not published to Active Directory so their properties cannot be found with a simple query to directory servicesAs a result of that, the remote machine hosting the queue must be on-line to determine anything about the queue. How Your WCF Service Can Use MSMQ as a Durable Message Store. Deploying the Service When all the necessary configuration steps are completed, you can add a reference to the new queued service from a client project.

You then can deploy the service as follows: using (TransactionScope ts = new TransactionScope()) { WcfMsmqService.SendMessageClient client = new WcfMsmqService.SendMessageClient(); WcfMsmqService.ApplicationMessage message = new WcfMsmqService.ApplicationMessage(); message.Message = "Hello from a WCF client ! "; message.ValidUntil = DateTime.Now.AddDays(7); client.SubmitMessage(message); ts.Complete(); } The calling code uses a transaction that is flowed to the service, but the service implementation does not actually participate in that transaction. The interaction between MSMQ and the target service, as it relates to transactions, essentially guarantees that no message will ever be lost.

WCF-NetMsmq Transport Properties Dialog Box, Receive, General Tab. Sample Starter Project Using WCF and MSMQ. Download source code - 33.8 KB Introduction As part of a project I was working on, I was tasked with developing a web service based on Windows Communication Foundation (WCF) as a frontend to an MSMQ queue. It was an opportunity to learn a new technology, and I eagerly looked around for examples. My initial attempts were quite frustrating. I found some samples on the web, but just could not get them to work. My manager suggested simplifying the application to simply queue an XML message rather than an object (PurchaseOrder), as shown in the article. MSMQ for .NET Developers, Part 2. Internet Messaging One of the more highly acclaimed features in MSMQ version 3.0 is the ability to send messages over the Internet—a feature known as Internet Messaging.

The nature of the message does not change, except that MSMQ formats the message as a SOAP message. The feature is useful because it allows sending applications to route messages through firewalls over port 80. Further, by using SSL you automatically gain the advantages of the high-grade security built into the transport, alleviating the need for a VPN to ensure payload security. Dead-Letter Queues. "Where have my MSMQ messages gone?" - MSMQ from the plumber's mate. A reasonably common question, this. QueueExplorer - manage MSMQ messages like they are files.