Skip to main content
Version: 10.9.x

Single View Trigger Generator

caution

This Plugin is a BETA Plugin and, as such, is currently under active development. Pay attention using it.

The Single View Trigger Generator has 3 fundamental parts:

  • The consumption of pr-update messages
  • The strategy execution
  • The production of sv-trigger messages

For each part we will need to configure a set of environment variables and config maps.

caution

Remember that the Single View Trigger Generator uses Kafka throughout the whole cycle and must be configured accordingly. To know more about the main changes from the old architecture please read the Single View Trigger Generator introduction page.

Environment variables

The following table indicates all the available environment variables for you to customize the service to your needs.

note

When creating the service from the marketplace the following environment variables will be added for you with some default values but you still need to properly update them to make the service work

NameRequiredDescriptionDefault value
LOG_LEVELtrueLevel to use for logging; to choose from: error, fatal, warn, info, debug, trace, silentsilent
MONGODB_URLtrueMongoDB URL where the projections are stored-
MONGODB_NAMEtrueMongoDB Database name where the projections are stored-
KAFKA_CLIENT_IDtrueThe Kafka client identifier-
KAFKA_GROUP_IDtrueKafka consumer group ID-
KAFKA_BROKERStrueList of brokers the service needs to connect to-
KAFKA_SASL_MECHANISMfalseSASL Mechanism with which connect to Kafka. You can choose between plain, scram-sha-256, scram-sha-512.plain
KAFKA_SASL_USERNAMEfalseUsername to use for logging into Kafka-
KAFKA_SASL_PASSWORDfalsePassword to use for logging into Kafka-
KAFKA_CONNECTION_TIMEOUTfalseTimeout in milliseconds for the connection to Kafka10000
KAFKA_AUTHENTICATION_TIMEOUTfalseTimeout in milliseconds for the authentication to Kafka10000
KAFKA_REQUEST_TIMEOUTfalseTimeout in milliseconds for each request to Kafka30000
KAFKA_SESSION_TIMEOUTfalseTimeout in milliseconds for the session expiration in Kafka30000
KAFKA_HEARTBEAT_INTERVALfalseInterval in milliseconds to perform each heartbeat3000
KAFKA_MAX_RETRY_TIMEfalseMaximum wait time for a retry in milliseconds. For more info please refer to the Kafka JS documentation30000
KAFKA_INITIAL_RETRY_TIMEfalseInitial value used to calculate the retry in milliseconds (This is still randomized following the randomization factor). For more info please refer to the Kafka JS documentation300
KAFKA_RETRIES_FACTORfalseRandomization factor. For more info please refer to the Kafka JS documentation0.2
KAFKA_RETRIES_MULTIPLIERfalseExponential factor. For more info please refer to the Kafka JS documentation2
KAFKA_MAX_RETRIESfalseMax number of retries per call. For more info please refer to the Kafka JS documentation5
CA_CERT_PATHfalseThe path to the CA certificate, which should include the file name as well, e.g. /home/my-ca.pem-
READ_TOPIC_FROM_BEGINNINGfalseIf true the consumer will start reading messages from topics from the beginning, instead of the message with the latest committed offset. This will happen only the first time connecting to the topic.false
KAFKA_PROJECTION_UPDATES_FOLDERtruePath to the folder that contains the file kafkaProjectionUpdates.json.-
TRIGGER_TOPICtrueKafka topic to send the sv-trigger (Projection Change) messages. If you don't have it already, checkout out the naming convention-
SINGLE_VIEW_NAMEtrueThe name of the Single View-
ER_SCHEMA_FOLDERtruePath to the ER Schema folder-
PROJECTION_CHANGES_SCHEMA_FOLDERtruePath to the Projection Changes Schema folder-
MANUAL_STRATEGIES_FOLDERfalsePath to the custom strategies folder where the custom strategies scripts are stored-
TRIGGER_CUSTOM_FUNCTIONS_FOLDERfalsePath to the custom functions folder used in __fromFile__ values''

Config Maps

The service can use the following 3 config maps:

note

When creating the service from the marketplace the following config maps will be created for you with some default values but you still need to properly configure them to make the service work

ER Schema

The ER Schema config map contains the erSchema.json file which describes the relationships between each projection of the System of Record/s.

Remember to copy/paste the mount path into the ER_SCHEMA_FOLDER environment variable so the service can read the file. To know more on how to configure the file please go to the ER Schema page.

Projection Changes Schema

The Projection Changes Schema config map contains the projectionChangesSchema.json file which defines how to get to the base projection of the single view starting from the projection in which we received the ingestion message.

Remember to copy/paste the mount path into the PROJECTION_CHANGES_SCHEMA_FOLDER environment variable so the service can read the file. If you need more info on how to configure the projectionChangesSchema.json file, please refer to the Projection Changes Schema page.

Kafka Projection Updates

The Kafka Projection Updates config map contains the kafkaProjectionUpdates.json file which defines the topics from where to consume the Projection Updates and the strategy to apply to each message.

Remember to copy/paste the mount path into the KAFKA_PROJECTION_UPDATES_FOLDER environment variable so the service can read the file. If you need more info on how to configure the kafkaProjectionUpdates.json file, please refer to the Kafka Projection Updates page.