5 Replies Latest reply on May 5, 2005 10:18 PM by genman

    Derfault Queue Priority?

    cpmcda01

      I know that the JMS API allows one to set a message priority from the QueueSender and TopicPublisher interfaces, but is there a way to configure the default message priority for an entire JBossMQ queue at deployment time? I have been searching for an answer but can't seem to find one, so I am wondering if this is even possible.

      Thanks.

        • 1. Re: Derfault Queue Priority?
          schrouf

          I dont think that there is a global property for that. Anyway, what is your general intention ?

          The message priority has only an effect on the delivery order of all messages for the same queue/topic. It does NOT affect the message processing priority between different queues/topics. Therefore a changed default message priority for single a queue/topic changes nothing...

          Regards
          Ulf

          • 2. Re: Default Queue Priority?
            cpmcda01

            Well, what we have is a case where there will be long-running data imports. We don't want these imports to significantly impact the performance of other requests to the system. Our original thought was that we could use JMS messaging to prioritize certain message types and acheive the desired effect. Unfortunately, since the priorities only effect messages within the same queue, we can not use multiple queues.

            It sounds like we may need to have a main queue with a consumer that acts as a router to other queues, passing along higher priority messages to their respective queues while deferring the passing of these long-running import messages. Of course, if import messages have already been passed on and are currently running, then it is still going to impact performance.

            Has anyone tried to do something like this? Any solution ideas?

            • 3. Re: Derfault Queue Priority?
              genman


              You could differentiate the two kinds of messages using a message selector. This way, the "low priority" messages are processed by one MDB, and the others by a separate MDB.

              • 4. Re: Derfault Queue Priority?
                cpmcda01

                 

                "genman" wrote:

                You could differentiate the two kinds of messages using a message selector. This way, the "low priority" messages are processed by one MDB, and the others by a separate MDB.


                For this, would I have to use Topics instead of queues?

                • 5. Re: Derfault Queue Priority?
                  genman


                  No, both MDB would read from the same Queue. Anyway, a prototype is worth a 1,000 words at this point.