This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Notification Center module

Status overview of entities across Vertex modules

The Notification Center keeps the latest errors and warnings of entities that other modules report, per entity type and tenant, for a rolling retention period (NotificationCenterModuleConfig.RetentionPeriodInHours, one week by default). The front end reads the overview and the tables of statuses through the GraphQL gateway.

Entity modules publish through providers. A provider derives from NotificationCenterProviderBase, names its recurring job with a DistributedWorkSchedule attribute, and publishes the statuses that changed in a recent lookback period on every run. The Notification Center tracks which period it holds statuses for. When it misses a period, it answers with that period, and the provider publishes a snapshot of it. A snapshot holds only the warnings and errors of that period: the provider queries them separately and leaves out successes, so a large period stays cheap. Snapshots merge by period, so smaller snapshots add up. A published status older than the stored status of the same entity is ignored, so a delayed or replayed publish never overwrites a newer status. NotificationCenterProvidersConfig.Providers configures individual providers, keyed by source module and then by entity type. Each entry can set IsEnabled, Schedule (a cron expression), and ChangesLookbackInMinutes. A setting that is not set follows the default of the provider. The lookback must be longer than the interval of the schedule, so consecutive runs overlap:

NotificationCenterProvidersConfig:
  Providers:
    Aggregate:
      IngestionBatch:
        IsEnabled: true
        Schedule: '*/5 * * * *'
        ChangesLookbackInMinutes: 15

A module built with VertexModuleBuilder adds NotificationCenterProvidersComponent. A manually composed module (one deriving from BaseModule) uses NotificationCenterManuallyComposedModuleExtensions: it calls AddNotificationCenterProviders in ConfigureModuleServices with its shutdown token and the assemblies to scan, and ScheduleNotificationCenterProviders on its module service provider in StartModule. AddNotificationCenterProviders loads the NotificationCenterProvidersConfig section itself.

Providers publish through INotificationCenterServiceClient, which the module registers as a remote gRPC client from EE.Modules.Infrastructure.NotificationCenter.GrpcClient. A module built with VertexModuleBuilder adds it to its GrpcServicesComponent:

.AddRemoteGrpcClient<NotificationCenterService.NotificationCenterServiceClient, INotificationCenterServiceClientFactory, INotificationCenterServiceClient>(
    GrpcServiceAddresses.NotificationCenter,
    stub => new NotificationCenterServiceClientFactory(stub),
    factory => factory.GetClient()
)

A manually composed module calls services.AddRemoteGrpcClient with the same arguments in ConfigureModuleServices. The Notification Center serves gRPC on port 7103. The Aspire AppHost and the vertex Helm chart inject its address as services__vertex-infra-notificationcenter__grpc__0.

The runtime project is EE.Modules.Infrastructure.NotificationCenter. Its deployment and documentation component name is vertex-infra-notificationcenter.