15.02.2015 Views

C# 4 and .NET 4

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1362 ❘ ChaPTer 46 messAGe QueuinG<br />

two different queue types are possible: source journaling <strong>and</strong> target journaling. Source journaling is<br />

turned on with the properties of a message; journal messages are stored with the source system. Target<br />

journaling is turned on with the properties of a queue; these messages are stored in the journal queue of<br />

the target system.<br />

Dead - letter queues store messages if a message doesn ’ t arrive at the target system before a specifi c timeout<br />

is reached. Contrary to synchronous programming where errors are immediately detected, errors must<br />

be dealt with differently using Message Queuing. The dead - letter queue can be checked for messages that<br />

didn ’ t arrive.<br />

Administration queues contain acknowledgments for messages sent. The sender can specify<br />

an administration queue from which it receives notifi cation of whether the message was sent<br />

successfully.<br />

A response queue is used if more than a simple acknowledgment is needed as an answer from the receiving<br />

side. The receiving application can send response messages back to the original sender.<br />

A report queue is used for test messages. Report queues can be created by changing the type (or category)<br />

of a public or private queue to the predefi ned ID {55EE8F33 - CCE9 – 11CF - B108 – 0020AFD61CE9} . Report<br />

queues are useful as a testing tool to track messages on their route.<br />

System queues are private <strong>and</strong> are used by the Message Queuing system. These queues are used for<br />

administrative messages, storing of notifi cation messages, <strong>and</strong> to guarantee the correct order of<br />

transactional messages.<br />

message queuing adminisTraTiVe Tools<br />

Before looking at how to deal with Message Queuing programmatically, this section looks at the<br />

administrative tools that are part of the Windows operating system to create <strong>and</strong> manage queues<br />

<strong>and</strong> messages.<br />

The tools shown here are not used only with Message Queuing. The Message Queuing<br />

features of these tools are available only if Message Queuing is installed.<br />

Creating message queues<br />

Message queues can be created with the Computer<br />

Management MMC snap - in. On a Windows 7 system,<br />

you can start the Computer Management MMC<br />

snap - in with the Start ➪ Control Panel ➪<br />

Administrative Tools ➪ Computer Management<br />

menu. In the tree view pane, Message Queuing is<br />

located below the Services <strong>and</strong> Applications entry.<br />

By selecting Private Queues or Public Queues, new<br />

queues can be created from the Action menu (see<br />

Figure 46 - 5). Public queues are available only<br />

if Message Queuing is confi gured in Active<br />

Directory mode.<br />

figure 46-5<br />

www.it-ebooks.info

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!