Specifying which types of message to receive using the message selector
A message selector is a string containing an expression used to control which messages are consumed by which MDBs. The application used in this recipe submits different messages to the same queue. The messages are then sent to different MDBs based on their message selector settings.
The essential structure of a servlet used to generate a message was introduced in the introduction. We will be using a
TextMessage to demonstrate the message selection process. This message type is discussed earlier in this chapter under the Handling a text-based message recipe. Here we will address the unique elements of creating and using a
TextMessage to support a message selector ...