MassTransit 9

Last reviewed Sep 20, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. C# 14106 lines · 4.4K tokens
  2. MassTransit 997 lines · 3.9K tokens
Total203 lines · 8.3K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 89
  • 94
  • 117
  • 190
  • 201
  • 208
  • 209
  • 214
  • 250
  • 257
  • 295
  • 319
  • 323
  • 327
  • 338
  • 362
  • 367
  • 378
  • 426
  • 441
  • 502
  • 532
  • 610
  • 611
  • 639
  • 674
  • 759
  • 770
  • 772
  • 775
  • 798
  • 807
  • 862
  • 915
  • 916
  • 918
  • 922
  • 1333
  • 1395

Prompt Preview

Apply the C# 14 prompt first. These rules cover MassTransit 9 in a C# 14/.NET 10 application, including its optional transports, persistence integrations, and ASP.NET Core dashboard.

The core package also targets .NET 8, .NET 9, .NET Standard 2.0, and .NET Framework 4.7.2. Those package assets do not establish runtime support or compatibility for every integration; verify the selected packages and runtime together.

License key and usage telemetry

  • Supply the license through MT_LICENSE, MT_LICENSE_PATH, SetLicense, or SetLicenseLocation from protected deployment configuration. Mount license files read-only outside web roots and keep them out of images, logs, and source control.
  • Validate license eligibility when upgrading MassTransit. Subscription expiry logs a warning without stopping services, and versions released during the licensed period retain downgrade rights; expiry is not an application access-control mechanism.
  • Call DisableUsageTelemetry() or set MASSTRANSIT_USAGE_TELEMETRY=false when external reporting is prohibited. Verify this in a deployed service: reporting occurs after five minutes and is suppressed by debugging and the test harness.

Dashboard exposure

  • Enable AddMassTransitDashboard and UseMassTransitDashboard only on an authenticated internal operator surface. The default /masstransit path exposes both UI and APIs, and RequireAuthorization defaults to false.
  • Set RequireAuthorization = true and an explicit AuthorizationPolicy; register the policy and run UseAuthentication() and UseAuthorization() before