Skip to content

Message Auditing

Mogens Heller Grabe edited this page Mar 14, 2023 · 6 revisions

This feature enables archival of all messages that are successfully handled by a Rebus instance.

Configuration

It must be enabled on a per-Rebus-instance basis like this:

services.AddRebus(
    configure => configure
        .(...)
        .Options(o => {
            var settings = new FleetManagerSettings(
                messageAuditingLevel: MessageAuditingLevel.Full
            );

            o.EnableFleetManager(..., settings);
        })
);

where MessageAuditingLevel.Full is the setting to make note of, as it defaults to MessageAuditingLevel.Meta, which does NOT include message payloads.

Setting the auditing level to MessageAuditingLevel.Meta simply means that Fleet Manager records metrics for all handled messages, which can then be used for displaying statistics about the number of handled messages.

Data ingestion

Once one or more connected Rebus instances have their message auditing level set to FULL, they will start forwarding message payloads to Fleet Manager.

⚠️ Setting message auditing level to FULL will increase the amount of data ingested by Fleet Manager, leading to a quicker usage of the quota – please watch the quota after you enable this feature and get in touch if you need an increase.

⚠️ Setting message auditing level to FULL will make the Rebus instance dependent on having Fleet Manager available, because otherwise it could potentially lose the audited message. If the audited message data cannot be safely stored in Fleet Manager, the Rebus instance will experience this as a failure to handle the incoming mesage, which in turn will be rolled back and subjected to the normal retry strategy.

Inspecting the archive

Once every night, all audited messages are collected into a GZIPped JSONL file, which can be found in Fleet Manager under Messages/Auditing.

Clone this wiki locally