How does MSMQ Transactional Message Delivery work?

风流意气都作罢 提交于 2019-12-04 03:13:07

The main thing to understand about transactional MSMQ is that there are actually 3 distinct transactions involved in a transactional transmission of a message to a remote queue.

  1. The sender writes the message to a local temporary queue.
  2. The queue manager on the senders machine transmits the message across the wire to the queue manager on the recipient machine.
  3. The receiver service processes the queue message and then removes the message from the queue.

So in answer to your questions:

When sending the message, is a local copy created on Machine B, before it gets delivered to machine A?

Yes

If so, is this behavior by default, or does it only occur when the "IsRecoverable" property is sent?

By default. This is what is known as store and forward.

Does the fact that the queue is transactional have any effect on this behavior?

No except for when there is a failure.

Since I'm using a transactional queue, where is the data once the transaction commits?

It depends which transaction you mean (see above)

Is it sitting locally, waiting for the msmq service to deliver the message to the remote queue?

Only if the remote queue is not available.

Or Is the message sitting in the queue on the remote machine?

If the receiver service fails to process the message succesfully (there is an exception in the handler) the message will stay on the remote queue.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!