我创建了一个消耗来自TIBCO EMS队列的消息的MDB。这工作正常,消耗所有消息。现在我需要实现一个消息选择器,只使用一种特定类型的消息。
问题是我的messageSelector无效,MDB仍在使用所有消息。
我的MDB
@MessageDriven(
name = "MDBPscInformationResponseReceiver",
activationConfig = {
@ActivationConfigProperty( propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty( propertyName = "destination", propertyValue ="jms/PscInformationResponseQueue"),
@ActivationConfigProperty( propertyName = "messageSelector", propertyValue ="TipoMensagem='UPDATE'")
}
)
public class MDBPscInformationResponseReceiver implements MessageListener {
收到消息(标题)
TextMessage={ Header={
JMSMessageID={ID:EMS-SERVER.BD0DC51386DFD35EC0:18012}
JMSDestination={Queue[WAI.SDAGL.08502.PSC.RPL]}
JMSReplyTo={null} JMSDeliveryMode={NON_PERSISTENT}
JMSRedelivered={false}
JMSCorrelationID={}
JMSType={}
JMSTimestamp={Wed Jun 05 11:08:07 BST 2013}
JMSExpiration={0}
JMSPriority={4}
}
Properties={
TipoMensagem={String:CONSULTA}
}
Text={<?xml version="1.0" encoding="UTF-8"?>
我正在使用GEMS发送消息(我有一个版画屏幕,但我还不能发布图片)
JMSDeliveryMode NON_PERSISTENT
JMSDestination WAI.SDAGL.08502.PSC.RPL
JMSCorrelationID
JMSType
JMSExpiration 0
JMSPriority 4
TipoMensagem CONSULTA
我已经从java(http://docs.oracle.com/javaee/6/tutorial/doc/bncgw.html)和想法中阅读了文档。