什么是交易消息? [英] What is transactional messaging?

查看:76
本文介绍了什么是交易消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试理解MSMQ上的事务消息传递的概念以及wcf中的事务支持。



对于具有事务支持的队列,是否意味着以下一组操作将是自动的?



1.机器1上的客户端A在其应用程序数据库中写入一行,该消息发送到队列。

2.创建/发送订单创建消息到队列(比如MSMQ)。

3.机器2上的客户端B接收MSMQ消息。

4.客户B在自己的应用程序数据库中创建一个订单行?



如果我在分布式事务中执行上述所有步骤,是否意味着所有4个步骤都将原子地失败或成功?



或者交易只适用于步骤1 - 2?



同样,如果上面说WCF而不是MSMQ,那么所有步骤都是原子的,即在交易中吗?



我尝试了什么:



尝试阅读有关它的不同文章。

I'm trying to understand the concept of transaction messaging on MSMQ as well as transaction support in wcf.

For Queues with transaction support, does it mean the following set of operations will be automatic?

1. Client A on Machine 1 writes a row in its application database that message sent to queue.
2. Creates/Sends a Order Create message to a queue (say MSMQ).
3. The MSMQ message gets picked up by Client B on Machine 2.
4. Client B creates an Order Row in its own application Database?

If I do all the above step in a distributed transaction, does it mean all 4 steps will either fail or succeed atomically?

Or transaction will only apply from step 1 - 2?

Similarly, if say WCF was involved above instead of the MSMQ, will all steps be atomic i.e within a transaction?

What I have tried:

Tried reading different articles about it.

推荐答案

阅读定义: [ ^ ]



如果您读取/写入消息队列并在事务中执行其他操作,它们都将成功或失败/回滚(因此对于队列没有入队和写入,并且没有出现队列和数据库提交或者回滚等。)。
Read the definition : [^]

If you read/write to a message queue and do other operations in a transaction, they will all succeed or fail/rollback (so for the queue no enqueue and for writes and no dequeue for reads, and databases commit or rollback etc.).


这篇关于什么是交易消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆