Messages have a large number of properties, and filtering the properties you want to receive can enable you to focus on only that information that is relevant to you. For example, if you are not working with transactional messages, you might not want to retrieve the properties associated with transactions. In this case, you would set the MessagePropertyFilter properties IsFirstInTransaction, IsLastInTransaction, TransactionID, and TransactionStatusQueue to False. Your MessageQueue component would not retrieve any of the property values corresponding to these properties whenever it gets a message from a queue.
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.
For a full list of all of the properties you can set, see the MessagePropertyFilter Class.
To specify the properties to retrieve with a message
Note You can use the SetAll method to set all the filter properties to true, or the ClearAll method to set all the filter properties to False.
Reading and Receiving Messages | Receiving Messages Programmatically | Peeking at Messages | Receiving Messages Asynchronously | Creating MessageQueue Components