Geeks With Blogs
| Home |



MSMQ is a component of Windows 2000, Windows XP, Windows Server 2003, and will be included in Windows Vista and future server versions of Windows. It allows cooperating applications to send and receive messages to each other—even if the intended recipient application is not running, or the computer on which the sender or recipient application is running is disconnected from the network. Messages are stored and forwarded by MSMQ until they reach the destination queue. A recipient application can retrieve data from the queue.


Teoria Microsoft

The Message Queuing technology allows applications running at different times to communicate across heterogeneous networks and systems that might be temporarily offline. Applications send, receive, or peek (read without removing) messages from queues. Message Queuing is an optional component of Windows 2000 and Windows NT, and must be installed separately.

The MessageQueue class is a wrapper around Message Queuing. There are multiple versions of Message Queuing, and using the MessageQueue class can result in slightly different behavior, depending on the operating system you are using. For information about specific features of each version of Message Queuing, see the topic "What's New in Message Queuing" in the Platform SDK in MSDN.

The MessageQueue class provides a reference to a Message Queuing queue. You can specify a path in the MessageQueue constructor to connect to an existing resource, or you can create a new queue on the server. Before you can call Send(Object), Peek, or Receive, you must associate the new instance of the MessageQueue class with an existing queue. At that point, you can manipulate the queue properties such as Category and Label.

MessageQueue supports two types of message retrieval: synchronous and asynchronous. The synchronous methods, Peek and Receive, cause the process thread to wait a specified time interval for a new message to arrive in the queue. The asynchronous methods, BeginPeek and BeginReceive, allow the main application tasks to continue in a separate thread until a message arrives in the queue. These methods work by using callback objects and state objects to communicate information between threads.

When you create a new instance of the MessageQueue class, you are not creating a new Message Queuing queue. Instead, you can use the Create(String), Delete, and Purge methods to manage queues on the server.

Unlike Purge, Create(String) and Delete are static members, so you can call them without creating a new instance of the MessageQueue class.

You can set the MessageQueue object's Path property with one of three names: the friendly name, the FormatName, or the Label. The friendly name, which is defined by the queue's MachineName and QueueName properties, is MachineName\QueueName for a public queue, and MachineName\Private$\QueueName for a private queue. The FormatName property allows offline access to message queues. Lastly, you can use the queue's Label property to set the queue's Path.

For a list of initial property values for an instance of MessageQueue, see the MessageQueue constructor.

My First Project MSQ My Salvation :D

my first project using MSQ arose from the need to provide 2 different applications which transmitting data between them. (WAAA IS something so simple but here was my first contact with MSQ).

MSQ Case Business

need building system progressive acumulative for Slot Machine, Casinos and other machines system game.

view 1

Explanation :

1.- machines send information (account, credits, winners, loser, games in process) to server.

2.- server receive information and send object business to service process.

3.- service process information logic business and send results to all or one machines slots or system progressive.

4.- service send message all aplications.

5.- message send in order and priority .

6.- application receive message and process action business.

7.- other application receive message and process action business.


But now enjoying its full power of the MessagueQueue 

1.- receive and send object serialization in xml or format binary :D.
2.- send Broadcast all user in my  system or send message to one user :D
3.-support transaction in MSQ
4.-priority message
5.-level privacity
ufff all ideas :D


View Repository MSQ in my project.




this objects  travellers in the red serialized, just do a cast on the other side and we already have our order ready on the other side of the application ready for processing. :D :D

THANKS MSQ !!! jejeje is easy my live


Posted on Friday, July 3, 2009 9:07 PM Distributed Systems | Back to top

Related Posts on Geeks With Blogs Matching Categories

Comments on this post: Using MessagueQueue - Episode 1

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © ReDsKuLLS | Powered by: