Skip to content

Configuring the Fleet Manager Plugin

Mogens Heller Grabe edited this page Feb 9, 2022 · 5 revisions

When you connect a Rebus instance to Fleet Manager, you will be calling .EnableFleetManager(...) in the options configurer, like so:

services.AddRebus(
	configure => configure
		.(...)
		.Options(o => o.EnableFleetManager(...))
);

or so:

Configure.With(...)
	.(...)
	.Options(o => o.EnableFleetManager(...))
	.Start();

depending on which IoC container you are using.

The first two arguments to the configuration extension method are

  1. The URL of the Fleet Manager instance you want to connect to, and
  2. The API key you want to use

so making the call will usually look something like this:

services.AddRebus(
	configure => configure
		.(...)
		.Options(o => o.EnableFleetManager(url, key))
);

If you're using the cloud-hosted Fleet manager, the URL will be https://api.rebus.fm. If you're using an on-premise installation, it will be something else.

The API key will be something you go and generate in Fleet Manager under the relevant account. It both authenticates and authorizes the Rebus instance to record events in Fleet Manager, and it decides which account the events go into. Therefore, it's totally OK to share the API key among multiple Rebus instances, as long as you want them to show up under the same account.

More configuration options

In addition to the aforementioned two arguments, a third argument can specify some FleetManagerSettings to use:

var settings = new FleetManagerSettings();

services.AddRebus(
	configure => configure
		.(...)
		.Options(o => o.EnableFleetManager(url, key, settings))
);

The constructor of FleetManagerSettings has default parameters for all of the defaults, and you may then set any of them if you like. The following parameters are available:

  • enableDiagnosticLogging (default: false): Enable super-verbose logging of things that happen internally in the plugin.
  • sagaAuditingLevel (default: SagaAuditingLevel.Full): Specifies the level of auditing for saga data. Can be set to SagaAuditingLevel.Full (a full snapshot is taken of each saga revision), SagaAuditingLevel.Meta (only metadata about each revision is recorded), or SagaAuditingLevel.None (no information about saga revisions will be sent to Fleet manager).
  • messageAuditingLevel (default: MessageAuditingLevel.Meta): Configures how much information should be recorded about handled messages. Can be set to MessageAuditingLevel.Meta (meaning that only headers of handles messages are sent), or MessageAuditingLevel.Full (meaning that all messages successfully handled by that Rebus instance get recorded in Fleet Manager).
  • failedMessageLogLevel (default: LogLevel.Info): Configures the log level that the plugin should use when logging that it has moved a failed message to Fleet Manager. Options are the usual LogLevel.Debug, LogLevel.Info, LogLevel.Warn, and LogLevel.Error.
  • deadLetteringStrategy (default: DeadLetteringStrategy.StoreInFleetManager): Configures what to do when a message cannot be handled. Can be set to DeadLetteringStrategy.StoreInFleetManager (failed messages are only stored in Fleet Manager), DeadLetteringStrategy.StoreInErrorQueue (failed messages are moved to a dead-letter queue, i.e. default Rebus behavior), or DeadLetteringStrategy.StoreInFleetManagerAndErrorQueue (stores failed messages BOTH in Fleet Manager AND in the dead-letter queue).