Sending Messages to a Queue

Sending messages is an asynchronous operation that requires opening the destination queue and sending the message.

The body of an MSMQ message can be any intrinsic Variant, including string, date, currency, any number type, an array of bytes, as well as any persistent ActiveX object that supports IDispatch and IPersist (IPersistStream or IPersistStorage).

For examples on… See…
Sending a String Sending a String in a Message
Sending a Date Sending a Date in a Message
Sending a Currency Sending a Currency in a Message
Sending a number Sending a Number in a Message
Sending an array of bytes Sending an Array of Bytes in a Message
Sending persistent objects in a message Sending a Persistent Object
Sending a data recordset in a message Sending a Data Recordset in a message
Sending private (encrypted) messages Sending Private Messages
Sending messages that return MSMQ acknowledgment messages Sending Messages that Request Acknowledgments
Sending messages that return MSMQ response messages Sending Messages that Request a Response

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.