Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JMS persistent vs non-persistent messages...

 
SAFROLE YUTANI
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just want to make sure that I understand this corectly. Refer to the diagram below...

If a JMS message is created and configured to "PERSISTENT" by Application A1, then, once the JMS provider (Weblogic) receives the message, the provider will gaurantee that the message is delivered. The persistence mode of a message is irrelevant until the message actuallys makes it to the provider because if the message fails in transit, I'm assuming that it is impossible for the provider to ever be aware of this condition, in which case the send() method will throw an exception to the client and the client can handle the situation.
The concept of "jms stores" only applies to messages defined as persistent. The JMS provider will accept a message from a client, determine the delivery mode, and write the message to the store if the message is defined as persistent. At some point in the future, the provider will attempt to deliver the message to its destination, and if the delivery fails, the provider is responsible for re-delivering the message again, since the message is defined as persistent. The provider does not consider the message delivered -- from the client -- until after it successfully writes the message to the store, and, the provider does not consider the message to be successfully consumed until after the message is delivered to the destination and successfully consumed, either from a return from onMessage() or commit on a JMS transacted session.
Look good?
Raffi
[ June 30, 2003: Message edited by: SAFROLE YUTANI ]
 
Paulo Salgado
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Safrole, I am not familiar with the specific JMS implementation of Weblogic, but I suspect there may be another "layer" to the description you presented.
If application A1 is running on Server S1 and publishes a message to a Topic being served to application B1 running on Server S2, there may be a mechanism in S1 where the JMS implementation will "fool" application A1 and say the message was delivered. Behind the scenes there will be a program actually trying to connect to and send the message out to the Topic in S2. Being this way, the message can be considered persistent at the moment application A1 sent it.
If both applicatioins run on the same server then it is just a matter of making a copy of the message to disk and put it into the Topic. Again, the message would be considered persistent at the moment it is sent by application A1.
Again, I'm not sure if Weblogic works this way, but I'd say it has at least similar mechanism.
Regards.
-Paulo
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!