How to: Specify Properties to Retrieve with a Message
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
When you create an instance of the MessageQueue component, you can set a series of properties to indicate what properties you want to retrieve when the component gets a message from a queue. These properties exist in a class called MessagePropertyFilter and correspond to actual properties on the Message class. When you set the value for one of these properties to true, the component will retrieve the corresponding property each time a message is removed from the queue.
Tip
If you do not need access to some properties in your retrieved message and want to improve performance, you can set the MessagePropertyFilter to false.
By default, the properties retrieved with a message include properties indicating the time it was sent and arrived, several identifiers for the message, the message's label, the response queue, and the body of the message.
To specify the properties to retrieve with a message
Create an instance of the MessageQueue component and set its Path property to the queue to which you want to refer. For more information, see How to: Create MessageQueue Component Instances.
In the Properties window, expand the MessageReadPropertyFilter node.
Set the value for the properties you want to receive to true.
See Also
Tasks
How to: Receive Messages Programmatically
How to: Receive Messages Asynchronously
How to: Create MessageQueue Component Instances