A developer impalements an asynchronous implementation for calculating insurance proposals.
The input data for the calculations is made available on a single message queue. Two types of
insurance proposals will be calculated: car and life. Message with data for other insurance types
are posted on the queue but should be left on the queue by this implementation.
Which statement is true?
A.
The developer will NOT succeed because all messages will be consumed from the queue.
B.
The developer can implement a push-back mechanism if the message is of the wrong type.
C.
The developer can use a messageSelector to receive only the car and life data message if the
JMS body contains selectable data.
D.
The developer can use a messageSelector to receive only the car and life data message if the
header contains properties to make selection.
Explanation:
A JMS message selector allows a client to specify, by header field references and
property references, the messages it is interested in. Only messages whose header and property
values match the selector are delivered. What it means for a message not to be delivered depends
on the MessageConsumer being used (see QueueReceiver and TopicSubscriber).
Reference:javax.jms Interface Message