Filters

The concept of filters allows WebSphere MQ Everyplace to perform powerful message searches. Most of the major queue manager operations support the use of filters. The mqeQueueManager_getMessage function has an MQeFields parameter. This Fields object is the filter. If you pass 'null' in then no filter is used.

The use of a filter causes an application to return the first available message that contains the same fields and values as the filter. An example of using a filter on a getMessage() function is in Application example Ex2.

When a filter is applied to a search, the fields in the filter are compared with each index entry in turn. If a field is common to both the index entry and the filter, and the values in the field are different, then the message cannot possibly match the filter and it is excluded from consideration. If a field is not common to both filter and index entry, or if the field is common and the values are the same, then the message is included in the search.



© IBM Corporation 2000, 2003. All Rights Reserved