System Events
- Version: 0.3
- Status: Completed
- Created: 2024-01-06
- Updated: 2025-12-04
- To be consulted:
- Martti Tamm (martti.tamm@ut.ee)
- Marko Arrak (marko.arrak@ut.ee)
This document describes the Kafka messages that the system emits internally, and their consumers. All messages are encoded as JSON objects.
TOPIC: node.email
This message is emitted when a user needs to be notified via email. There are multiple services that send it, and independent email sender is listening for these messages just to render the text, compose the email, and send it.
datetimeβΒ the original timestamp when the email was initiatedtemplate_idβ the name of the email templatetemplate_varsβ data for the template.lang_codeβ the language of the e-mail (defaults to English)recipient_nameβ the name of the recipientrecipient_emailβ the email address where to sendsender_nameβ the name of the sendersender_emailβ the email address of the sender (or reply-to)retry_countβ the number of the attempt (initially: 0).
TOPIC: node.user
The message is emitted for user info changes. Although, generally this topic records user-events for historical purposes, it is also used for disconnecting users from the application when their session is revoked due to a role-change.
targetβ the username that was affected.parentβ the parent organisation (ID).scopeβ the type of change with potential values:profileβ user’s name and description change, or when user is added.rolesβ user’s role change.sessionβ user’s session started or ended.
beforeβ the value before (session ID when session ended); can be omitted.afterβ the value after (session ID when session started); can be omitted.
TOPIC: node.session
The message is emitted for user-session events that are initiated by the user itself (including log-out due to a new login). Currently, this covers only log-out scenarios for closing open WebSocket connections.
session_idβ the session identifier that this event applies to.usernameβ the username of the session.actionβ the type of action (currently only theendvalue is used).
TOPIC: dataset.<state>
This is a short-hand topic-description for each state of the dataset. The full list of topics covered here is:
dataset.unregistereddataset.registereddataset.publicdataset.hiddendataset.archived
The message is emitted when a new dataset is detected and added to the database
(dataset.unregistered) or when a dataset is moved to one of these states.
dataset_idβ internal numeric ID of the dataset.dataset_pidβ public persistent identifier (once dataset is public).updated_byβ the username of the user who updated this dataset. When the system itself triggered it, it’s value isgdi-node-pipelines.
TOPIC: dataset.deleted
This message is emitted when a data-provider user requests the deletion of a dataset, which is in the REGISTERED or UNREGISTERED state. The message triggers a pipeline, which removes dataset files from S3 storage, and its database records. It does not remove related Kafka messages.
provider_idβ reference to the owner (ID) of the dataset.dataset_idβ internal numeric ID of the dataset.user_idβ the username of the user who requested the deletion.