System.Messaging Reference (Document! X Sample)
System.Messaging Namespace / MessageQueue Class
Fields Properties Methods Events


In This Topic
    MessageQueue Class Members
    In This Topic

    The following tables list the members exposed by MessageQueue.

    Public Constructors
     NameDescription
    Public ConstructorOverloaded.   
    Top
    Public Fields
     NameDescription
    Public Fieldstatic (Shared in Visual Basic)Specifies that no size restriction exists for a queue.  
    Public Fieldstatic (Shared in Visual Basic)Specifies that no time-out exists for methods that peek or receive messages.  
    Top
    Public Properties
     NameDescription
    Public PropertyGets a value that indicates the access mode for the queue.  
    Public PropertyGets or sets a value that indicates whether the queue accepts only authenticated messages.  
    Public PropertyGets or sets the base priority Message Queuing uses to route a public queue's messages over the network.  
    Public PropertyGets a value that indicates whether the MessageQueue can be read.  
    Public PropertyGets a value that indicates whether the MessageQueue can be written to.  
    Public PropertyGets or sets the queue category.  
    Public Property (Inherited from System.ComponentModel.Component)
    Public PropertyGets the time and date that the queue was created in Message Queuing.  
    Public PropertyGets or sets the message property values to be used by default when the application sends messages to the queue.  
    Public PropertyGets or sets a value that indicates whether this MessageQueue has exclusive access to receive messages from the Message Queuing queue.  
    Public Propertystatic (Shared in Visual Basic)Gets or sets a value that indicates whether a cache of connections will be maintained by the application.  
    Public PropertyGets or sets a value that indicates whether the queue accepts only non-private (non-encrypted) messages.  
    Public PropertyGets the unique queue name that Message Queuing generated at the time of the queue's creation.  
    Public PropertyGets or sets the formatter used to serialize an object into or deserialize an object from the body of a message read from or written to the queue.  
    Public PropertyGets the unique Message Queuing identifier of the queue.  
    Public PropertyGets or sets the queue description.  
    Public PropertyGets the last time the properties of a queue were modified.  
    Public PropertyGets or sets the name of the computer where the Message Queuing queue is located.  
    Public PropertyGets or sets the maximum size of the journal queue.  
    Public PropertyGets or sets the maximum size of the queue.  
    Public PropertyGets or sets the property filter for receiving or peeking messages.  
    Public PropertyIntroduced in MSMQ 3.0. Gets or sets the multicast address associated with the queue.  
    Public PropertyGets or sets the queue's path. Setting the Path causes the MessageQueue to point to a new queue.  
    Public PropertyGets or sets the friendly name that identifies the queue.  
    Public PropertyGets the native handle used to read messages from the message queue.  
    Public Property (Inherited from System.ComponentModel.Component)
    Public PropertyGets or sets the object that marshals the event-handler call resulting from a ReceiveCompleted or PeekCompleted event.  
    Public PropertyGets a value that indicates whether the queue accepts only transactions.  
    Public PropertyGets or sets a value that indicates whether received messages are copied to the journal queue.  
    Public PropertyGets the native handle used to send messages to the message queue.  
    Top
    Protected Properties
    Public Methods
     NameDescription
    Public MethodOverloaded. Initiates an asynchronous peek operation that has no time-out. The operation is not complete until a message becomes available in the queue.  
    Public MethodOverloaded. Initiates an asynchronous receive operation that has no time-out. The operation is not complete until a message becomes available in the queue.  
    Public Methodstatic (Shared in Visual Basic)Clears the connection cache.  
    Public MethodFrees all resources allocated by the MessageQueue.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Creates a non-transactional Message Queuing queue at the specified path.  
    Public MethodCreates a new Cursor for the current message queue.  
    Public Method (Inherited from System.MarshalByRefObject)
    Public Methodstatic (Shared in Visual Basic)Deletes a queue on a Message Queuing server.  
    Public MethodOverloaded. Overridden. Disposes of the resources (other than memory) used by the MessageQueue.  
    Public MethodCompletes the specified asynchronous peek operation.  
    Public MethodCompletes the specified asynchronous receive operation.  
    Public Methodstatic (Shared in Visual Basic)Determines whether a Message Queuing queue exists at the specified path.  
    Public MethodReturns all the messages that are in the queue.  
    Public MethodEnumerates the messages in a queue. GetEnumerator is deprecated. GetMessageEnumerator2 should be used instead.  
    Public Method (Inherited from System.MarshalByRefObject)
    Public Methodstatic (Shared in Visual Basic)Gets the identifier of the computer on which the queue referenced by this MessageQueue is located.  
    Public MethodCreates an enumerator object for all the messages in the queue. GetMessageEnumerator is deprecated. GetMessageEnumerator2 should be used instead.  
    Public MethodCreates an enumerator object for all the messages in the queue.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Provides forward-only cursor semantics to enumerate through all public queues on the network.  
    Public Methodstatic (Shared in Visual Basic)Retrieves all the private queues on the specified computer.  
    Public Methodstatic (Shared in Visual Basic)Overloaded. Retrieves all the public queues on the network.  
    Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues on the network that belong to the specified category.  
    Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues on the network that carry the specified label.  
    Public Methodstatic (Shared in Visual Basic)Retrieves all the public queues that reside on the specified computer.  
    Public Methodstatic (Shared in Visual Basic)Retrieves the security context that MSMQ associates with the current user (thread identity) at the time of this call.  
    Public Method (Inherited from System.MarshalByRefObject)
    Public MethodOverloaded. Returns without removing (peeks) the first message in the queue referenced by this MessageQueue. The Peek method is synchronous, so it blocks the current thread until a message becomes available.  
    Public MethodOverloaded. Peeks the message that matches the given correlation identifier and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.  
    Public MethodOverloaded. Peeks the message whose message identifier matches the id parameter.  
    Public MethodOverloaded. Introduced in MSMQ 3.0. Peeks at the message that matches the given lookup identifier from a non-transactional queue.  
    Public MethodDeletes all the messages contained in the queue.  
    Public MethodOverloaded. Receives the first message available in the queue referenced by the MessageQueue. This call is synchronous, and blocks the current thread of execution until a message is available.  
    Public MethodOverloaded. Receives the message that matches the given correlation identifier (from a non-transactional queue) and immediately raises an exception if no message with the specified correlation identifier currently exists in the queue.  
    Public MethodOverloaded. Receives the message that matches the given identifier from a non-transactional queue and immediately raises an exception if no message with the specified identifier currently exists in the queue.  
    Public MethodOverloaded. Introduced in MSMQ 3.0. Receives the message that matches the given lookup identifier from a non-transactional queue.  
    Public MethodRefreshes the properties presented by the MessageQueue to reflect the current state of the resource.  
    Public MethodResets the permission list to the operating system's default values. Removes any queue permissions you have appended to the default list.  
    Public MethodOverloaded. Sends an object to non-transactional queue referenced by this MessageQueue.  
    Public MethodOverloaded. Gives a computer, group, or user the specified access rights.  
    Public Method (Inherited from System.ComponentModel.Component)
    Top
    Protected Methods
     NameDescription
    Protected Method (Inherited from System.ComponentModel.Component)
    Protected Method (Inherited from System.ComponentModel.Component)
    Protected MethodOverloaded.  (Inherited from System.MarshalByRefObject)
    Top
    Public Events
     NameDescription
    Public Event (Inherited from System.ComponentModel.Component)
    Public EventOccurs when a message is read without being removed from the queue. This is a result of the asynchronous operation, BeginPeek.  
    Public EventOccurs when a message has been removed from the queue. This event is raised by the asynchronous operation, BeginReceive.  
    Top
    See Also