5 Replies Latest reply on Dec 20, 2002 5:33 AM by eguib

    JMS / Message Driven Bean FIFO

    sheetszc

      If a message is published to a JBossMQ Queue, I need to ensure that I all of the messages get processed in a FIFO manner. If I am using a Message Driven Bean to process that Queue, then I would assume that I can only have a single MDB listening to that Queue in order to ensure FIFO - is there a way to enforce this type of MDB configuration in JBossMQ? I noticed that there was a MaximumSize and MaxMessages paramerter for the <container-invoker-conf> element and also a MaximumSize and a MinimumSize for the <container-pool-conf> element - should I set the MaximumSizes both to 1?

        • 1. Re: JMS / Message Driven Bean FIFO
          joelvogt

          yep, put these in your jboss.xml and should be okay

          • 2. Re: JMS / Message Driven Bean FIFO
            schrouf

            But keep in mind that FIFO message delivery isn't guaranteed by JMS specification !

            Message processing with a single threaded consumer MDB will certainly work in most cases when ALL messages will use the same message priority, but I am not sure what will happen in case of message redelivery situations ( e.g. after transaction or network failures ) ?!?

            • 3. Re: JMS / Message Driven Bean FIFO
              schrouf

              But keep in mind that FIFO message delivery isn't guaranteed by JMS specification !

              Message processing with a single threaded consumer MDB will certainly work in most cases when ALL messages will use the same message priority, but I am not sure what will happen in case of message redelivery situations ( e.g. after transaction or network failures ) ?!?

              If you really have to ensure 100% FIFO processing some higher level application logic ( e.g. sequence numbers ) is required, even if it's always cumbersome :-(

              • 4. Re: JMS / Message Driven Bean FIFO
                schrouf

                But keep in mind that FIFO message delivery isn't guaranteed by JMS specification !

                Message processing with a single threaded consumer MDB will certainly work in most cases when ALL messages will use the same message priority, but I am not sure what will happen in case of message redelivery situations ( e.g. after transaction or network failures ) ?!?

                If you really have to ensure 100% FIFO processing some higher level application logic ( e.g. sequence numbers ) is required, even if it's always cumbersome :-(

                • 5. Re: JMS / Message Driven Bean FIFO
                  eguib

                  you should pay attention, that the spec does not define
                  the order of delivery for JMS messages.
                  This means that even if your settings will work with
                  JBoss this may not be true for other app servers.

                  Erwin