4 Replies Latest reply on Sep 16, 2003 10:08 AM by rytrom

    MessageCache clarification

    rytrom

      I read instructions on configuring Message Cache and a basic question arises in my mind - how does it work?:-) The docs' explanation leaves dark spots in my understanding of cache functionality.

      When a message gets to a queue it's immediately gets persisted (on a proper destination) or firstly stored in memory and only in case of getting out of a predefined cache limit being moved to persistante storage? If so then what guaranties messages safety in case of server crash? A log record? Too many assumptions.

      Pls. describe the whole algorithm correctly.

        • 1. Re: MessageCache clarification

          The cache has nothing todo with persistence.
          It just flushes messages to disk that would otherwise
          use up memory.

          If a message is persistent and you are using durable
          subscriptions or a permenant queue, the message is
          persisted before it is made availble to the queue.
          It is only removed from the persistent store at
          acknowledgement/transaction commit.

          Regards,
          Adrian

          • 2. Re: MessageCache clarification
            rytrom

            > The cache has nothing todo with persistence.
            > It just flushes messages to disk that would
            > otherwise use up memory.

            You mean that after a message is persisted it gets available to the queue it's loaded into the main memotry? And amount of such messages is configured by the cache?

            • 3. Re: MessageCache clarification

              It tries to keep a copy of the message in memory for
              performance reasons.
              If memory exceeds the highmemorymark it starts flushing messages to disk to keep memory below the maxmemorymark

              For jdbc2 this is a no-op for persistent messages
              because the cache and pm are the same store.
              The other persistent managers don't know about the cache
              so you can get two copies of the message on disk.

              Regards,
              Adrian

              • 4. Re: MessageCache clarification
                rytrom

                I got it! Thx.