0 Replies Latest reply on Aug 27, 2014 11:35 AM by Aparna Gupta

    messageSelector property not working.

    Aparna Gupta Newbie



      We have two MDBs listening to the same Queue and one of the MDB has message selector while the other doesnt.

      During execution, the object is being passed to the MDBs in a round robin manner and the messageSelector property is not working.


      We get a warning message while starting the jboss-eap 6.1 container : ActivationConfigProperty task will be ignored since it is not allowed by resource adapter: hornetq-ra

      where, task is the messageSelector property.


      Below is the code of how we are setting the property in Producer:


                 Context initialContext = new InitialContext();

                  connectionFactory = (ConnectionFactory) initialContext.lookup("java:/ConnectionFactory");

                  Queue queue = (Queue) initialContext.lookup("java:jboss/exported/queue/"+queueName);

                  connection = connectionFactory.createConnection();

                  Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);   

                  MessageProducer qMessageProducer = session.createProducer(queue);

                  ObjectMessage message = session.createObjectMessage(object.toString());

                  if (LOGGER.isDebugEnabled()) {

                      LOGGER.debug("putting data on to queue :" + message.getJMSDestination());


                  // message Selector filter.




      The annotation used at the Consumer side :  @ActivationConfigProperty(propertyName = "task", propertyValue = "xyz")


      Any help is appreciated.