<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>jba blog &#187; MSMQ</title>
	<atom:link href="http://jbablog.com/tag/msmq/feed/" rel="self" type="application/rss+xml" />
	<link>http://jbablog.com</link>
	<description>the personal blog of John BouAntoun</description>
	<lastBuildDate>Fri, 18 Nov 2011 01:18:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>MSMQ Path Names and Format Names</title>
		<link>http://jbablog.com/2009/02/msmq-path-names-and-format-names/</link>
		<comments>http://jbablog.com/2009/02/msmq-path-names-and-format-names/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 21:38:45 +0000</pubDate>
		<dc:creator>jba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://jbablog.com/?p=171</guid>
		<description><![CDATA[Great post over at the plumber&#8217;s mate about the difference between all the ways to address MSMQ&#8217;s.]]></description>
			<content:encoded><![CDATA[<p>Great <a href="http://blogs.msdn.com/johnbreakwell/archive/2009/02/26/difference-between-path-name-and-format-name-when-accessing-msmq-queues.aspx">post</a> over at the <a href="http://blogs.msdn.com/johnbreakwell/">plumber&#8217;s mate</a> about the difference between all the ways to address MSMQ&#8217;s.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbablog.com/2009/02/msmq-path-names-and-format-names/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting a Clustered MSMQ Queue Length with .Net and COM</title>
		<link>http://jbablog.com/2008/06/getting-a-clustered-msmq-queue-length-with-net-and-com/</link>
		<comments>http://jbablog.com/2008/06/getting-a-clustered-msmq-queue-length-with-net-and-com/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 11:37:17 +0000</pubDate>
		<dc:creator>jba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://jbablog.com/?p=45</guid>
		<description><![CDATA[So in reference to my previous post, I finally found a way to extract the queue length of an MSMQ Queue behind a clustered server, and it involves, of all things, COM. There doesn&#8217;t seem to be any other non-hackish way to get a queue length fast from a clustered server, the links discussed in [...]]]></description>
			<content:encoded><![CDATA[<p>So in reference to my <a href="http://jbablog.com/2008/06/why-do-i-always-have-to-find-the-boundary-cases-or-reading-an-msmq-length-form-net/">previous post</a>, I finally found a way to extract the queue length of an MSMQ Queue behind a clustered server, and it involves, of all things, COM. There doesn&#8217;t seem to be any other non-hackish way to get a queue length fast from a clustered server, the links discussed in my previous post work fine for non clustered environments, but this is the solution for a clustered environment.</p>
<ul>
<li>First:<br />
Add a COM Reference to the <strong>Microsoft Message Object 3.0 Type Library</strong> (if on Windows XP or Server 2003).If you&#8217;re stuck on vista then manually browse to <strong>C:\windows\system32\mqoa.dll</strong> and add that as a reference.</li>
<li>Second:<br />
Use the following code and pay special attention to the format of the <strong>FormatName</strong> parameter and the server parameter. It took me a long time of fiddling with string formats to get the correct one and no one else on the lazy web seems to have mentioned the specific format needed.<br />
<code>int queueCount;<br />
MSMQ.MSMQManagement mgmt = new MSMQ.MSMQManagement();<br />
object oMissing = Type.Missing;<br />
object server = (object) "MSMQServer";<br />
object formatName = (object) "Direct=OS:MSMQServer\private$\queueName";<br />
mgmt.Init(ref server, ref oMissing, ref formatName);<br />
Console.WriteLine("response " + mgmt.MessageCount.ToString() +  Environment.NewLine);<br />
int.TryParse(mgmt.MessageCount.ToString(), out queueCount);</code></li>
</ul>
<p>Apologies for the bad vertical spacing, wordpress keeps on insisting on closing my &lt;code&gt; section early if I insert empty newlines in it.</p>
]]></content:encoded>
			<wfw:commentRss>http://jbablog.com/2008/06/getting-a-clustered-msmq-queue-length-with-net-and-com/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Why do I always have to find the boundary cases, or &#8216;Reading an MSMQ length form .net&#8217;</title>
		<link>http://jbablog.com/2008/06/why-do-i-always-have-to-find-the-boundary-cases-or-reading-an-msmq-length-form-net/</link>
		<comments>http://jbablog.com/2008/06/why-do-i-always-have-to-find-the-boundary-cases-or-reading-an-msmq-length-form-net/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 04:14:29 +0000</pubDate>
		<dc:creator>jba</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[MSMQ]]></category>
		<category><![CDATA[pain]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://jbablog.com/?p=43</guid>
		<description><![CDATA[Watch out, a coding related post. So I coded up a little MSMQ dumping utility the other day, in part to learn about MSMQ and in part to pick up some domain knowledge around one of the more fragile systems at work. And before you start laughing, yes I know it&#8217;s been over 3 years [...]]]></description>
			<content:encoded><![CDATA[<p>Watch out, a coding related post.</p>
<p>So I coded up a little MSMQ dumping utility the other day, in part to learn about MSMQ and in part to pick up some domain knowledge around one of the more fragile systems at work. And before you start laughing, yes I know it&#8217;s been over 3 years since I wrote a real app, but anyhow I gave it a crack.</p>
<p>Coded the utility up in about four hours, including time to acquire domain knowledge and MSMQ knowledge and ended up with this app:</p>
<p><a href="http://jbablog.com/wp/wp-content/uploads/2008/06/waitqueuedumper.png"><img class="aligncenter size-medium wp-image-44" title="waitqueuedumper" src="http://jbablog.com/wp/wp-content/uploads/2008/06/waitqueuedumper-300x196.png" alt="Wait Queue Dumper" width="300" height="196" /></a></p>
<p>Now this thing works perfectly on the staging machine, but refuses to return the <a title="Using performance counters to get queue count from MSMQ in C#" href="http://www.developermania.com/newsgroups/item/196103/Re_count_of_message_in_the_msmq.aspx">Queue Count</a> on the live server. Enter the <a href="http://blogs.msdn.com/johnbreakwell/archive/2008/05/01/how-to-fix-missing-msmq-wmi-classes.aspx">MSMQ from the plumber&#8217;s mate</a> blog. Full of lots of little handy hints on how to make MSMQ performance counters actually work.</p>
<p>Why can MSMQ installs get so broken, so often, that an MSMQ blogger can have so much material to talk about when fixing it? I don&#8217;t know if I should be happy I found a plentiful source for potential solutions, or worried about the  many ways a seemingly simple operation can go wrong?</p>
]]></content:encoded>
			<wfw:commentRss>http://jbablog.com/2008/06/why-do-i-always-have-to-find-the-boundary-cases-or-reading-an-msmq-length-form-net/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

