2 Replies Latest reply on Dec 19, 2001 2:52 PM by cepage

    JMSPriority not working

    rajeshbhujbal

      Hi,
      I am sending messages from client to MDB continuously. I set message priority to 9. After sending message if I check message priority of send message it shows it as 4 everytime. I also get priority in MDB in onMessage method (Here also it show prority 4).

      Is message priority working in Jboss? if yes how? how to set priority?

      i am using message1.setJMSPriority(9) method.

      If message priority is working in Jboss, how does it process messages? Suppose I send two types of messages having prority 4 and 8 continuously, does message with priority 8 will be processed first and starve messages with priority 4?


      Rajesh

        • 1. Re: JMSPriority not working
          rajeshbhujbal

          i am using jboss-2.2.2 on windows platform.

          Rajesh

          • 2. Re: JMSPriority not working
            cepage

            You can not use setMessagePriority to assign message priority before putting it into the queue. Perhaps that seems a bit odd, but this is a JMS spec issue, not a JBoss issue.

            You must pass the message priority in as a parameter to QueueSender.send( ... ) or TopicPublisher.publish( ... ) in order for your message to be assigned the priority.

            I have had great success with message priorities and MDB's in JBoss 2.4.3.

            Good luck,
            Corby