Message Keywords (Queue Search)
The queue device messages table contains a number of columns which map to properties on the MessageContext class. These properties are settable by custom devices, and can subsequently be used to search within the queue.
Specific messages types (HL7v2, for example) automatically populate these fields from the incoming message. If your message type contains data which maps to these columns, you should update the appropriate property on the MessageContext class.
The following code is a contrived example of setting MessageContext properties.
The queue now displays these values, and they can be searched/filtered by end users.
There is a special queue column, Keywords, which is designed for data which doesn’t map to any other queue column (or MessageContext property). For example, you may be processing HL7v2 data and want to add searchable content in addition to the existing queue columns.
In this case, you use the MessageContext.Keywords collection.
These values are now searchable within the Keywords column.
The Keywords column is intended for short textual content.