![]() ![]() Note the parameter I have passed to the the Create method. ' If there is an error creating a queue you get a MessageQueueException exception Catch ex As MessageQueueException In the code snippet given below I am creating a private queue named MyNewQueue. You can use the Create shared method of the MessageQueue class to create a queue. I presume MSMQ is installed on your system. Queues can be created either programmatically or through the computer management snap-in. The Message class provides everything required to define and use an MSMQ message. It is like a wrapper around message queuing. The MessageQueue class provides all the necessary functionality to work with and manipulate MSMQ queues. The System.Messaging namespace provides a set of classes which can be used to work with MSMQ. In this article we will be mainly focusing on Message and MessageQueue classes. Private queues on the other hand are available locally on a particular machine and are not published in the active directory. So, applications running on different servers throughout the network can find and use public queues through the active directory. Public queues are those that are published in the active directory. So, in this article I shall focus mainly on these operations. Before doing that I would like to mention about the basic types of MSMQ queues: Private and Public. ![]() ![]() To build a messaging application we need to create a queue first, have one application send messages to it and have another application receive those messages from it. One thing to note here is that the sender and the receiver are not tightly coupled and they can work without the other application being online. The receiving application receives the message from the queue and processes it. A message can be any piece of information that the receiving application understands. A sending application prepares a message and puts it into a queue. Let me take a couple of minutes here to explain what messaging is. Here, you have two applications: a sending application and a receiving application. In this article I will discuss very elementary concepts of MSMQ programming like creating a queue, writing a message to the queue and receiving from it etc. Talk of messaging, what strikes immediately is MSMQ which stands for Microsoft Message Queuing. MSMQ provides a great framework for applications that use messaging infrastructure. Talk of enterprise applications, things that come to your mind are transactions ,messaging etc. ![]()
0 Comments
Leave a Reply. |