home *** CD-ROM | disk | FTP | other *** search
-
- <!-- #include virtual="/quickstart/howto/include/header.inc" -->
-
- <h4>How Do I...Control a message queue?</h4>
-
- <div class="indent" style="width:660">
- <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; WORD-SPACING: 0px"><font face="Tahoma" size="1">Message
- queuing makes it easy for application developers to communicate with application
- programs quickly and reliably by sending and receiving messages. Messaging
- provides you with guaranteed message delivery and a robust, fail-safe way to
- carry out many of your business processes.<br>
- <br>
- The MessageQueue component allows you to easily incorporate message-based
- communication into your applications. Using this component and its associated
- language features, you can send and receive messages, explore existing queues,
- create and delete queues, and perform a variety of other operations using a
- simple programming model.<br>
- <br>
- This sample illustrates how to change some properties of a message queue. It's a
- small console application that can be run from a command prompt. Run the sample
- without any command line arguments and it will print its full usage
- instructions.</O:P>
- <O:P>
- </O:P>
- </span></p>
- <p class="Text"><span style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma; mso-bidi-font-size: 10.0pt">For
- example, if you want change a queue's label run: </O:P>
- </span></p>
- <p class="MsoNormal" style="MARGIN-LEFT: 0.5in"><span style="COLOR: blue; FONT-FAMILY: Courier New; mso-bidi-font-size: 12.0pt"><font size="2">>
- MQCtrl.exe MyQueue l "New Label"</font></span><span style="FONT-SIZE: 8pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-bidi-font-size: 12.0pt"><O:P>
- </O:P>
- <O:P>
- </O:P>
- </span></p>
- <p><span style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma; mso-bidi-font-size: 12.0pt">In
- its simplest form, changing a property of a message queue involves:</span></p>
- <p><span style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma; mso-bidi-font-size: 12.0pt">1.
- Instantiating a MessageQueue component and pointing it to an existing queue:</span></p>
- <blockquote>
- <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; WORD-SPACING: 0px"><font face="Courier New" color="#0000ff" size="2">MessageQueue mq = new
- MessageQueue(mqPath);</font></p>
- </blockquote>
- <p><span style="FONT-SIZE: 8pt; FONT-FAMILY: Tahoma; mso-bidi-font-size: 12.0pt">2.
- Setting the property to a new value:<O:P>
- </span></p>
- <blockquote>
- <p><font face="Courier New" color="#0000ff" size="2">mq.Label = "New
- Label";</font></p>
- </blockquote>
- <p style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; WORD-SPACING: 0px"><font face="Tahoma" size="1">Have
- a good time MessageQueue'ing!</font></p>
-
- </div>
-
- <h4>Example</h4>
-
- <p>
- <div class="indent">
- <a target="_blank" href="/quickstart/howto/samples/Services/MessageQueue/MQCtrl">
- <img style="border-color:black" border=1 src="/quickstart/images/genicon.gif"><br>
- </a>
- <div class="caption">MQCtrl.exe</div><br>
- [<a target="_blank" href="/quickstart/howto/samples/Services/MessageQueue/MQCtrl">View Sample</a>] |
- [<a target="_blank" href="/quickstart/util/srcview.aspx?path=/quickstart/howto/samples/Services/MessageQueue/MQCtrl/MQCtrl.src">View Source</a>]<p>
- </div>
-
- <h4>Source Code</h4>
-
- <div class="code">
- <xmp>
- <!-- #include virtual="/quickstart/howto/samples/Services/MessageQueue/MQCtrl/MQCtrl.cs" -->
- </xmp>
- </div>
-
- <!-- #include virtual="/quickstart/howto/include/footer.inc" -->