Filters allow WebSphere MQ Everyplace to perform powerful message searches. Most of the major queue manager operations support the use of filters. You can create filters using MQeFields.
Using a filter, for example in a getMessage() call, causes an application to return the first available message that contains the same fields and values as the filter. The following examples create a filter that obtains the first message with a message id of '1234':
MQeFields filter = new MQeFields(); filter.putArrayOfByte( MQe.Msg_MsgID, MQe.AsciiToByte( "1234" ) );
You can use this filter as an input parameter to various API calls, for example getMessage.