tag:blogger.com,1999:blog-1304066656993695443.post4057986365396711227..comments2023-12-17T11:32:00.020+00:00Comments on Paul Done's Technical Blog: SHOCKER: XA Distributed Transactions are only Eventually Consistent!Paul Donehttp://www.blogger.com/profile/09556312012162376804noreply@blogger.comBlogger8125tag:blogger.com,1999:blog-1304066656993695443.post-9059585839638276172019-12-16T15:58:49.932+00:002019-12-16T15:58:49.932+00:00OK I may have misunderstood then :-)
Eventual con...OK I may have misunderstood then :-)<br /><br />Eventual consistency would require the message to arrive only when the DB is updated, and that is possible with XA.<br /><br />Whether or not one wants idempotent services depends on the use case I guess.<br /><br />Cheers!Guyhttps://www.blogger.com/profile/17883710834193340570noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-49296298760887995442019-12-15T21:10:24.273+00:002019-12-15T21:10:24.273+00:00Also you've got me on a roll here. Duplicates ...Also you've got me on a roll here. Duplicates is a common thing given that most messaging systems are at-most-once or at-least-once delivery. Make your services idempotent.Paul Donehttps://www.blogger.com/profile/09556312012162376804noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-49132212855540057472019-12-15T21:08:57.689+00:002019-12-15T21:08:57.689+00:00Also I never claimed Pending DB locks were exclusi...Also I never claimed Pending DB locks were exclusive to 2PC. They just tend to become more severe and long lived in these cases. Feels like you blog comment was just an excuse to advertise your wares.Paul Donehttps://www.blogger.com/profile/09556312012162376804noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-34777326427623197442019-12-15T21:05:26.645+00:002019-12-15T21:05:26.645+00:00The main part of the blog post is about eventual c...The main part of the blog post is about eventual consistency. You can't get two different unrelated resources to perform the second phase of 2PC commit, persist these committed and make them available to subsequent consumers simultaneously at the same point of time. That isn't a technical implementation issue.Paul Donehttps://www.blogger.com/profile/09556312012162376804noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-90144436042665490402019-12-14T10:28:04.551+00:002019-12-14T10:28:04.551+00:00The example you give with messaging does work, if ...The example you give with messaging does work, if you use the right transaction manager.<br /><br />For instance, <a href="https://www.atomikos.com" rel="nofollow">Atomikos</a> supports this perfectly.<br /><br />Pending DB locks in Oracle can also happen without XA, so XA is not the cause. Pending SQL sessions are, if you don't set the "queryTimeout" correctly.<br /><br />I do hope that MongoDB supports XA one day. Otherwise your messaging use case can either lose messages or get duplicates.<br /><br />CheersGuyhttps://www.blogger.com/profile/17883710834193340570noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-45132304249960933632019-01-30T05:01:36.092+00:002019-01-30T05:01:36.092+00:00Is there any fool proof solution available for thi...Is there any fool proof solution available for this now or still we need to rely on workarounds like delayed messaging or retrying till the data is available?Ghttps://www.blogger.com/profile/08237558605565322788noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-78963453738410198112017-05-22T10:46:30.401+01:002017-05-22T10:46:30.401+01:00You are not alone. We too have the same case, A DB...You are not alone. We too have the same case, A DB update and an MQ message, where the listener comes back a read the DB. Exact case as you have shown in diagrams.Anonymoushttps://www.blogger.com/profile/07007716103209948326noreply@blogger.comtag:blogger.com,1999:blog-1304066656993695443.post-59283860483695192302016-03-21T08:16:06.874+00:002016-03-21T08:16:06.874+00:00Thanks for the interesting blog post! Related is M...Thanks for the interesting blog post! Related is Mark Little's blog post (http://jbossts.blogspot.co.uk/2014/05/bringing-transactional-guarantees-to.html). It describes using compensating transactions in MongoDB, driven by a transaction manager (Narayana, which comes pre-installed in WildFly 8). Such "relaxed-ACID transactions" relax the isolation and consistency guarantees.Anonymoushttps://www.blogger.com/profile/08686582041273735154noreply@blogger.com