4 Replies Latest reply on Nov 6, 2001 7:42 PM by hchirino

    priority ordering

    seemakc

      I have a MDB listening to a queue that receives both synchronous and asynchronous messages. I need to process the synchronous messages first. Is there a way I can do this ? How does JBoss handle JMSPriority header ? Does it guarantee priority ordering of messages ?

        • 1. Re: priority ordering
          charlesc

          Can you actually implement a MDB that listens to synchronous message?

          Charles

          • 2. Re: priority ordering

            There is no such thing as "synchronous and asynchronous messages", there is only synchronous and asynchronous ways of getting messages from the queueu. Your onlu chance I think is to have the MDB use a seletor of some cind of property that tells that this is the message to fecth (async) and that your sync JMS client (is it in a session bean?) select on another property.

            //Peter

            • 3. Re: priority ordering
              seemakc

              sorry, I should have been more clear. I have a client that sends messages to a queue. The client may or may not need to wait for replies (hence synchronous or asynchronous). The MDB consumes these messages, does some processing and returns a reply. I am using message selectors to make sure the messages are consumed by the right component. But I want the MDB to process the synchronous messages first (if there are both async and sync messages in the queue at the same time), as I don't want my client to time out. I thought of setting the JMSPriority header but I'm not sure how JBoss handles that. Any ideas would be appreciated and thanks for the help.

              • 4. Re: priority ordering
                hchirino

                Yes, last time I checked, the priorities (0-10) are honored.

                Regards,
                Hiram