.NET Agent Now Supports Microsoft Message Queue (MSMQ) Activity

We’re happy to announce that with the newest version of our .NET agent [3.4.24.0], New Relic now gives you a view into the Microsoft Message Queue activity that your application performs! Read on to understand more about how New Relic presents your app’s MSMQ activity in our UI.

A little background

One of the tenets of distributed computing is reliable message queueing. A message queue allows for the coordination of application activity across disparate systems by storing messages sent between the applications. The figure below illustrates the relationship between parts of an application acting as Message Producers and other parts acting as Message Consumers.

MSMQ 1

Note: The message queue diagram above comes from the Microsoft Developers Network.

.NET developers have typically relied on Microsoft Message Queue as the message broker and queuing technology for their applications. MSMQ provides transactional message delivery, security, and many other features of an enterprise-ready messaging service.

The .NET agent now allows you to view application actions against an MSMQ queue. Some typical queue actions include

  • Publish a message
  • Consume a message
  • Peek at a message (but do not remove it from the queue)
  • Purge a queue (removing all messages from the queue)

Each of these actions are represented as segments of a transaction in New Relic. Here are a few examples of what you will see in the New Relic UI.

Publishing a message

Below, you’ll see an example of a Model-View-Controller (MVC) Web transaction. The controller name is “Home” and the controller action is “Send.” In the Breakdown table, the publishing of five messages to a private queue named “nrtestqueue” is noted as a segment of the overall Web transaction. We categorize message queue operations using the category “MessageBroker.”

MSMQ 2

Consuming a message

Another place in the UI that we display message queue activity is in a Transaction Trace Detail for slow transactions. The screenshot below shows an example of consuming a message. Note the magnifying glass icon, which lets you see a stack trace for the “taking” of the message from the queue.

MSMQ 3

 

Finally, in the UI you will also find a “Messages” section under Transaction Traces:

MSMQ 4

To get started digging into your Microsoft Message Queue activity all you have to do is update to the latest .NET agent, and you’re on your way!

Feedback is welcome!

We would love to hear your feedback about this feature and how we can enhance it to make it even better. Once you’ve given it a try, let us know what you think in the .NET Agent category of our Community Forum.

Bob Uva is a Senior Software engineer working on New Relic's .Net Agent. View posts by .

Interested in writing for New Relic Blog? Send us a pitch!