1 2 Previous Next 20 Replies Latest reply on Jan 7, 2010 9:51 AM by timfox Go to original post
      • 15. Re: Paging
        ataylor
        As long as the messages are delivered within the JMS ordering semantics then the JMS spec is adhered to.
        • 16. Re: Paging
          timfox

          Well, the JMS spec is explicit in that should never rely on the results of a QueueBrowser to accurately represent the contents of a queue, anyway. Any application that does that is broken:

           

          Section 5.9, JMS 1.1 spec:

           

          "Messages may be arriving and expiring while the scan is done. JMS does not
          require the content of an enumeration to be a static snapshot of queue content.
          Whether these changes are visible or not depends on the JMS provider."

           

          Regarding selectors: Let's say your server is running in 100MiB of RAM, so you set paging max size to 70MiB (for example), and you have 10 TiB (terabytes) of messages, most paged to storage.

           

          You have a selector that only selects certain messages, and you expect all matching messages to be consumed irrespective of whether they are paged or not.

           

          Think about what you're asking here.

           

          Either

           

          a) We store all 10 TiB in memory and apply selectors as normal in memory? Clearly we can't do that since we only have 100MiB of RAM

           

          b) Somehow, we scan through the files on disk, perhaps applying indexes and efficiently fetch all matching messages?

           

          Hang on a second, that's exactly what a relational database is designed to do, not a messaging system! We're not in the business of writing a RDBMS.

           

          This kind of thing comes up from time to time. If you're using a messaging system to select subgroups of messages from a very large dataset (bigger than can fit in RAM) then probably you shouldn't be using a messaging system, you should be using a database.

           

          You're effectively just executing queries against tables and then is not the primary purpose of a messaging system.

           

          And I very doubt that would work efficiently in Websphere MQ either.

           

          If you use a screwdriver as a hammer it might work, but a hammer would work better.

          • 17. Re: Paging
            timfox

            If you don't want to page, you can set the AddressFullMessagePolicy to BLOCK instead of PAGE, this will push back on producers preventing them from sending more than can fit in memory.

             

            That's an alternative to paging.

            • 18. Re: Paging

              Thanks for all the explanation

               

              I am not planning to use HornetQ as a storage database. I don't have selectors nor browsing in my application. HornetQ just works fine now.

               

              I am just evaluating the use of HornetQ in our other applications so I have to understand how it works (and why to see if it is an advantage).

               

              The thing is that I didn't face this in MQ. In MQ you set the depth of a queue (maximum number of messages). I think this is clearer to the end-user. You get an error when you exceed this limit. This is what you last proposed.

              • 19. Re: Paging
                ataylor
                Throwing an error when the queue is full is not really handling the issue and subsequently is simpler to understand. We offer paging and producer flow control to solve the problem.
                • 20. Re: Paging
                  timfox

                  Take a look in the user manual.

                   

                  You can either PAGE, BLOCK or DROP when an address is full. It's up to you how you configure it.

                  1 2 Previous Next