Kafka is used as a message broker across the components that make up the Notification solution. We are currently running Apache Kafka on Confluent Cloud through Azure enabling seamless integration with the rest of our components hosted in Azure.
On this page:
Kafka topic overview
Below is an overview of the Kafka topics used in our system,
along with information about the producers and the content of each topic
Description: A topic dedicated to emails that are completed and ready to be sent to out where at least
one previous attempt of sending the email has failed.
Event trigger: Initial attempt to send the email has failed due to an unknown or intermittent reason.
Description: A topic dedicated to sms messages that are completed and ready to be sent to out where at least
one previous attempt of sending the sms has failed.
Event trigger: Initial attempt to send the sms has failed due to an unknown or intermittent reason.
Description: An object containing an Altinn service update of a schema specified in the payload.
Cluster configuration
The kafka cluster used by Altinn Notifications, is a cluster shared between multiple Altinn components.
Configuration in relation to roles and topic policies are in place to ensure integrity in the data on topics
owned by the Notifications solution.
Roles
Three roles are defined and used by entities interacting with Kafka from the solution.
NotificationsConsumer: can consume from topics following the naming patterns altinn.notifications.* and altinn.platform.*
NotificationsProducer : can write to topics following the naming patterns altinn.notifications.* and altinn.platform.*
ClusterAdmin: can create a new topics following the naming patterns altinn.notifications.* and altinn.platform.*
Topic configuration
Partitions
The number of partitions on a topic is set at creation. As our solution has the ability to auto scale,
we have set the number of partitions equal to the maximum number of nodes available in the AKS cluster
running the consumer microservices. This means the maximum numbers of consumers per consumer group will be equal to
the number of nodes in the cluster.
Retention
Retention time varies between the environments.
For all AT environments retention time for a message is 7 days.
In YT, TT and production retention time for a message is 365 days.