6.7. Idempotent Operations


A message is guaranteed to be persisted when the message sent to a persistent destination returns with no exception.
An exception does not guarantee the message was not persisted, because failure may have occurred between the message being persisted and a response being returned to the caller.
Applications must therefore be coded so that operations are idempotent — that is, operations can be repeated without causing the system to become inconsistent.
You can implement this behaviour on the application level by checking for duplicate messages and discarding them if the original message has been sent successfully. This duplicate checking is a powerful technique that can remove the need for XA transactions.
JBoss Messaging is configured by default to perform duplicate checking in a clustered environment.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.