MassTransit Saga - Errors and Inconsistencies

I have implemented the Suspersite Saga, which works as it should, many times. However, there are times when messages are sent to the error queue or simply disappear. I am using RabbitMQ.

I would like to know: 1. How to get a reason / exception message that causes the message to go into the error queue? (NOTE: The logic of my handler is inside the try-catch block, so these errors seem to occur even before the handler logic is called) 2. What could be the reason for the loss of messages?

Thanks in advance.

+4
source share
1 answer

I seem to understand this. To get exceptions, configure NLog (or log4Net), add a link to the appropriate NLogIntegration library, and finally, in the initialization of the service bus, enable sbc.UseNLog (); (for NLog). There seems to be no documentation in this documentation. I had to understand the methods of the NLogIntegration library.

In connection with the messages in the error queue, the error message was "Message limit exceeded rabbitmq: // localhost / workers_sagas: 08cf6e3e-d772-e62b-1803-73779fa60000". This is apparently due to the fact that I used the In-Memory repository for Saga Persistence. Therefore, whenever the process on which the saga was started was restarted, all sagas that were not yet completed caused the above error because they were no longer in the repository.

+6
source

Source: https://habr.com/ru/post/1436772/


All Articles