Is it possible to perform a receive from one queue, and send to another within the same transaction? e.g.:
using (var tx = new TransactionScope())
{
var inMsg = recv.Receive();
var val = msg.GetBody<int>();
var outMsg = new BrokeredMessage(val + 1);
sender.Send(outMsg);
inMsg.Complete();
tx.Complete();
}
The above appears to give me an exception suggesting it isn't possible:
"The Transaction may have timed out or attempted to span multiple top-level entities such as Queue or Topic."
But surely this is a very common requirement? Is there a way around this?
(This is using Service Bus for Windows Server, if that makes a difference)