Why NServiceBus ForwardRecievedMessagesTo and what are the performance implications of using it?

StackOverflow https://stackoverflow.com/questions/10473047

  •  06-06-2021
  •  | 
  •  

Question

What is the intended usage of ForwardRecievedMessagesTo?

I read some where that it is to support auditing. Is there any harm in using it as a solution to ensure that messages have been processed and if not reprocessing them? lets say a message was sent to queue_A@server_A and also forwarded to q_All@server_All and before the message was handled, machine_A died irrecoverably. In such a case, I could have a handler pick up messages from q_All@sever_All and check against a database table if the message has been processed. If not reprocess(publish or send) the message or save it in a database table.

Also, what is the performance implication of using forwardreceivedmessageto? How is it different from journalling?

Yes, I am trying to not use msmq clustering.

Was it helpful?

Solution

The feature is there to support auditing. If your machine dies during processing then the messages will backup at the sending machine and would continue to flow after the machine recovered. This means you must size the disk on the sending machine appropriately. You could leverage auditing to accomplish this and the overhead would be minimal. The implication would be the time it would take to complete the distributed transaction to the other machine where your audit queue lives which should be very small.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top