Skip to content

Concepts

Architecture

Events can be sent and subscribed to through Platform PubSub service. The overall architecture of platform eventing is depicted below: EventLog.png

At the moment only platform services are event emiters. For publishing events via PubSub both bearer and DHI SAS tokens are required. Therefore the following conditions should be met:

  • for retrieving DHI SAS token:
    • there is a customer and users onboarded
    • customer has at least one project and it has correct user permissions and access rights
  • for retrieving bearer token:
    • there is app registration in DHI internal Azure subscription
    • app registration has api access for PubSub app registration
    • published event type is registered and known by PubSub(manual step done by Platform Team)

Subscription to events requires either DHI SAS token or bearer token, depending on if subscription is single or multi tenant. Subscribing to single tenant events can be done using SignalR or its implementation in Platform SDK.

Offset

When subscribing to events it is possible to use an offset from which messages can be retrieved. Available options are:

  • beginning
  • specific offset point
  • end(retrieve only newest messages)

Offset.png

Transient events

Events can be published as transient and as non transient events. Transient events are not replayable and are to be consumed in realtime. Transient and non transient events are ordered separately, therefore the order is guaranteed only within the context of non transient events and transient event separately.