[jboss-user] [JBoss Messaging] - Re: False negatives and jms

timfox do-not-reply at jboss.com
Mon Oct 15 17:28:37 EDT 2007


If the call to send a persistent message to a persistent destination returns successfully with no exception, then you can be sure that the message was persisted.

However if the call doesn't return successfully e.g. if an exception is thrown, then you *can't be sure the message wasn't persisted*. Since the failure might have occurred after persisting the message but before writing the response to the caller.

So, yes you are correct. This is a common attribute of any RPC type call: You can't tell by the call not returning that the call didn't actually succeed. Whether it's a web services call, an HTTP get request, an ejb invocation the same applies.

The trick is to code your application so your operations are *idempotent* - i.e. they can be repeated without getting the system into an inconsistent state.

With a message system you can do this on the application level, by checking for duplicate messages, and discarding them if they arrive.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095417#4095417

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095417



More information about the jboss-user mailing list