-
1. Re: Message Cache configuration problem
adrian.brock Mar 22, 2007 1:43 PM (in response to vitor_b)I don't think you understand how the MessageCache works.
It plays no part in storing Persistent Messages.
What it does do is to discard messages from memory (when memory is tight)
that it is sure are in persistent storage and reload them when they are needed.
That means it needs to store messages that are NOT persistent to move them
out of memory. These have "TXOP=T" in the database. T meaning temporary.
The number of Hard references are the number of working messages in memory
(nothing to do with those that are persisted).
i.e. It is the ones that are currently (or recently) being sent and received.
If they are persistent, they will remain in the database until some client acknowledges
receipt of the message. -
2. Re: Message Cache configuration problem
adrian.brock Mar 22, 2007 1:49 PM (in response to vitor_b)JMS quarantees that a persistent message is either stored or you get
an error message.
The JBoss implementation looks like this (with some internal error handling removed
and comments added in block captials):public class PersistentQueue extends org.jboss.mq.server.BasicQueue { public void addMessage(MessageReference mesRef, Tx txId) throws JMSException { // MAKE SURE THE MESSAGE IS PERSISTED FIRST if (mesRef.isPersistent()) { try { server.getPersistenceManager().add(mesRef, txId); } catch (Throwable t) { // COULDN"T PERSIST IT, SO TELL THE CLIENT IT WASN"T SENT SpyJMSException.rethrowAsJMSException(error, t); } } // NOW WE ARE SURE IT IS PERSISTED, MAKE IT AVAILABLE IN THE QUEUE super.addMessage(mesRef, txId); }
-
3. Re: Message Cache configuration problem
vitor_b Mar 22, 2007 6:43 PM (in response to vitor_b)Hello
Thank you very much for your replies.
I need only a small confirmation. That all means that:
1. Non persisted messages are stored in the same persistent storage like messages marked as persistent, when cache manager is out of memory
2. Messages marked as persistent can be both: in memory (cache) and persistent storage at the same time
3. When lack of electricity happens all non persistent messages from memory will be lost (stored non persistent ones will survive).
Short answers like yes/no would be enought.
Best regards
vitor_b
P.S. hard to be a beginner