Spend all messages using MassTransit

I am currently building a system using MassTransit and RabbitMQ as my messaging layer. I am trying to find a way to have a Consumer that listens to all messages of all types on the bus. This is for our audit logging system, and we want to log all events passing through the message bus.

Is there a way to do this in MassTransit?

+4
source share
1 answer

You will need to add some type of audit interface to your message, which can be signed for audit purposes. For example, if you have to create a basic interface:

public interface IAuditable
{
    DateTime Timestamp {get;}
    string Username {get}
}

. . . , .

, ...

.

, , , , , .

observer , , (/), , , ..

+7

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


All Articles