Inconsistent caching of JMS Messages in J2EE Server


General J2EE: Inconsistent caching of JMS Messages in J2EE Server

  1. Inconsistent caching of JMS Messages in J2EE Server (3 messages)

    I am facing a strange problem with J2EE Server and JMS. I am using JMS and J2EE for application integration. Sometimes, when i start my JMS Client it starts processing some old messages that are processed by the same client sometime back... If you stop and restart the client again, the old messages are still coming ..... Then i pointed my JMS client to some other J2ee server, now it is working fine.. I don't know from where this J2ee server picks up all these messages.. This is highly inconsistent... Is J2ee server storing the message somewhere in its cache?? If so, how to overcome this problem....??

    I appreciate any suggestions or help in this regard.

  2. Don't know too much about JMS but there was a good article on javaworld this week about the effects of acknowledgement options and transactions in JMS. Could be that this has something to do with it.

    Javaworld article
  3. The particular behavior of JMS depends on the quality of the underlying messaging system. Rememer: JMS is to a messaging system what JDBC is to a relational database.

    So what you describe is a problem with a poor quality of service of your underlying messaging system.

    Most J2EE app servers will let you use different messaging systems as long as you have the right JMS "driver". You may want to look into picking the right messaging system for your app.

  4. But i am using sun's J2EE server for development. This problem is happening very frequently.