Sending messages is an asynchronous operation that requires opening the queue and sending the message.
The body of an MSMQ message can be a string, an array of bytes, or any persistent ActiveX object that supports IDispatch and IPersist (IPersistStream or IPersistStorage).
To transmit an object, the sending application specifies the object in the message's Body property. After the message arrives, the receiving application can deserialize the object using the message's Body property.
For examples of sending messages using ActiveX components, see:
The following is a complete list of message properties that can be set when sending a message.
Property | Description |
Ack | Determines the type of acknowledgment messages (default is none) MSMQ will generate and send back to the administration queue. |
AdminQueueInfo | Provides the MSMQQueueInfo object that MSMQ uses for sending acknowledgment messages. |
CorrelationId | Determines the application-defined identifier for the message. |
Delivery | Determines how MSMQ delivers the message: express or guaranteed delivery. |
EncryptAlgorithm | Determines which encryption algorithm is used when sending private messages. |
Label | Provides an application-defined label for the message. |
MaxTimeToReachQueue | Determines how long the message has to reach the queue. |
MaxTimeToReceive | Determines how long before the message must be removed from the queue. |
Priority | Determines the message's priority: effects routing and placement in the queue. |
PrivLevel | Determines if the message is sent as a private (encrypted) message. |
ResponseQueueInfo | Provides the MSMQQueueInfo object used for returning response messages. |