Skip to content

Messages

These messages are dispatched by the core. We will also add the message handlers that are going to be used to process these messages.

Message Message Handler
NotifyInputJobDispatcherMessage JobDispatcherMessageHandler::handleInputJobDispatcherMessage
ReDispatchMessage JobDispatcherMessageHandler::handleReDispatchMessage
JobDispatcherMessage JobDispatcherMessageHandler::handleNormalJobDispatcherMessage
ProgressFinishMessage ProgressFinishMessageHandler
ProgressUpdateMessage ProgressUpdateMessageHandler
AdvanceProcessStepMessage AdvanceProcessStepMessageHandler
EmptyMessage EmptyMessageHandler
HeartbeatMessage HeartbeatMessageHandler
TimeSeriesCollectionMessage TimeSeriesCollectionMessageHandler
NewUserMessage NewUserMessageHandler
SendMail SendMailHandler

Overview

Core Messages

Job Dispatcher Messages

These messages belong to the job dispatcher and are responsible for managing and coordinating flow execution related messages.

The class JobDispatcherMessage a base class for NotifyInputJobDispatcherMessage, NotifyTransformationJobDispatcherMessage and NotifyOutputJobDispatcherMessage. The corresponding handler (JobDispatcherMessageHandler::handleNormalJobDispatcherMessage) will take care of all JobDispatcherMessage messages except for the NotifyInputJobDispatcherMessage.

NotifyInputJobDispatcherMessage

This message is used for dispatching start messages (of a standard process definition). Theoretically, we also have NotifyTransformationJobDispatcherMessage and NotifyOutputJobDispatcherMessage, but they are not used.

The handler will create a process definition (consisting of a JobProgressDefinition and some SubsectionProgressDefinition objects as children). Afterwards, the process definition will be initialized:

An instance of ModuleJobDispatchContext with a JDM ID, a flow execution ID and an environment ID is going to be created.

Other Base Control Messages

The class BaseControlMessage has no inner meaning. It is meant to distinguish between Core Messages and messages that extend ModuleJobDispatchContextAwareMessage which are the messages of the modules.

ReDispatchMessage

This message is used to re-dispatch a subsection. This happens if a subsection is split to different batches. When the progress of a subsection is updated, it will be checked if there is a significant change in the percentage of processed items. By default, based on the environment variable PROGRESS_DISPATCH_CONDITION_GRANULARITY (default: 10), the percentage of processed items will be checked. If the difference is greater than the granularity, the subsection will be re-dispatched. If so, a RedispatchMessage will be dispatched to trigger the redispatch logic in JobDispatcherMappingHandler.

There is a rarely called second occurrence of the RedispatchMessage: If a parent subsection cannot be marked as done, it will also be dispatched.

The handler will set a lock on the process step (i.e. the flow execution) to avoid duplicate processing. It will load a JDMs and already dispatched JDMs. It will also include the environments to distinguish between JDMs in different environments. Based on these 2 information, it will dispatch all messages that need to be re-dispatched.

AdvanceProcessStepMessage

This message is part of the (synchonous) Progress Update handling. This message will be triggered on a ProgressUpdatedEvent. It will update the process step of the flow execution and call onLeave() of the current process step and onEnter() of the next process step.

EmptyMessage

This message is used when no specific action is required. It is used in the Standard process definition.

Progress messages (deprecated)

Besides the job dispatcher messages, we have messages that are responsible for handling progress updates.

ProgressUpdateMessage, ProgressUpdatePreviewMessage and ProgressFinishMessage

These messages belong to the deprecated UpdatesProgress trait. They will be dispatched in the methods updatesProgress and finishSubsection. They work asynchronously.

Other messages

HeartbeatMessage

This message is used by the heartbeat feature. See Heartbeat Command & Time series Command for more information.

TimeSeriesCollectionMessage

This message is used to handle time series data collection. See Heartbeat Command & Time series Command for more information.

NewUserMessage

This message is used to handle new user events.

SendMail

This message is used to handle sending emails.