Just wanted to get confirmation on how sending messages to remote transactional message queues works.
Suppose I have a two machines, A and B.
Machine A has a transactional queue that is used for receiving messages. A windows service monitors this queue and does something with the data (persists it to a SQL Server). Machine B is running an application that needs to write to the queue on Machine A.
A few questions:
When sending the message, is a local copy created on Machine B, before it gets delivered to machine A?
a. If so, is this behavior by default, or does it only occur when the "IsRecoverable" property is sent?
b. Does the fact that the queue is transactional have any effect on this behavior?
Since I'm using a transactional queue, where is the data once the transaction commits?
a. Is it sitting locally, waiting for the msmq service to deliver the message to the remote queue?
b. Or Is the message sitting in the queue on the remote machine?
I'm having trouble interpreting the documentation. In some places I see that the store and forward behavior is described, but I'm having trouble understanding whether that is the default behavior with transactional queues or if I need to do something explicitly to get that going.
In this article Sending and receiving applications can indicate that they want to send or retrieve messages within the context of a transaction. Sending or retrieving messages within the context of a transaction is referred to as transactional messaging.
For the MSMQ adapter, a transaction extends from the BizTalk MessageBox database to the local Message Queuing queue even if you are using a remote queue. You can use transactions on both send and receive with the MSMQ adapter.
Message Queuing (MSMQ) technology enables applications running at different times to communicate across heterogeneous networks and systems that may be temporarily offline. Applications send messages to queues and read messages from queues.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With