6. Config parameters for Scorpio

This section covers all the basic configuration needed for the Scorpio broker. This can be used as the basic template for the various micro-services of the Scorpio.

6.1. Description of various configuration parameters

  1. server:- In this, the user can define the various server related parameters like port and the maximum number of threads for the internal tomcat server. This is related to the microservice communication. Be careful with changes.
server:
 port: XXXX
 tomcat:
   max:
     threads: XX
  1. Entity Topics:- These are the topics which are used for the internal communication of Scorpio on Kafka. If you change this you need to change things in the source code too.
entity:
  topic: XYZ
  create:
   topic: XYZ
  append:
   topic: XYZ
  update:
   topic: XYZ
  delete:
   topic: XYZ
  index:
   topic: XYZ
  1. batchoperations:- Used to define the limit for the batch operations defined by NGSI-LD operations. This is http server config and hardware related. Change with caution.
batchoperations:
  maxnumber:
   create: XXXX
   update: XXXX
   upsert: XXXX
   delete: XXXX
  1. bootstrap:- Used to define the URL for the Kafka broker. Change only if you have changed the setup of Kafka
bootstrap:
  servers: URL
  1. csources Topics:- These are the topics which are used for the internal communication of Scorpio on Kafka. If you change this you need to change things in the source code too.
registration:
  topic: CONTEXT_REGISTRY
  1. append:- Used to define the entity append overwrite option. Change with only with extreme caution.
append:
  overwrite: noOverwrite
  1. spring:- Used to define the basic details of the project like service name as well as to provide the configuration details for Kafka, flyway, data source, and cloud. DO NOT CHANGE THOSE UNLESS YOU KNOW WHAT YOU ARE DOING!
spring:
 application:
   name: serviceName
 main:
   lazy-initialization: true
 kafka:
   admin:
     properties:
       cleanup:
         policy: compact
 flyway:
   baselineOnMigrate: true
 cloud:
   stream:
     kafka:
       binder:
         brokers: localhost:9092
     bindings:
        ATCONTEXT_WRITE_CHANNEL:
         destination: ATCONTEXT
         contentType: application/json
 datasource:
   url: "jdbc:postgresql://127.0.0.1:5432/ngb?ApplicationName=ngb_querymanager"
   username: ngb
   password: ngb
   hikari:
     minimumIdle: 5
     maximumPoolSize: 20
     idleTimeout: 30000
     poolName: SpringBootHikariCP
     maxLifetime: 2000000
     connectionTimeout: 30000
  1. query Topics:- These are the topics which are used for the internal communication of Scorpio on Kafka. If you change this you need to change things in the source code too.
query:
 topic: QUERY
 result:
   topic: QUERY_RESULT
  1. atcontext:- Used to define the URL for served context by scorpio for scenarios where a mixed context is provided via a header.
atcontext:
 url: http://<ScorpioHost>:<ScorpioPort>/ngsi-ld/contextes/
  1. Key:- Used to define the file for the deserialization. DO NOT CHANGE!
key:
 deserializer: org.apache.kafka.common.serialization.StringDeserializer
  1. reader:- Used to configure the database to the Scorpio broker, required to perform all the read operations. This example is based on the default config for a local installed Postgres DB
reader:
 enabled: true
 datasource:
   url: "jdbc:postgresql://localhost:5432/ngb?ApplicationName=ngb_storagemanager_reader"
   username: ngb
   password: ngb
   hikari:
     minimumIdle: 5
     maximumPoolSize: 20
     idleTimeout: 30000
     poolName: SpringBootHikariCP_Reader
     maxLifetime: 2000000
     connectionTimeout: 30000
  1. writer:- Used to configure the database to the Scorpio broker, required to perform all the write operations. This example is based on the default config for a local installed Postgres DB.
writer:
 enabled: true
 datasource:
   url: "jdbc:postgresql://localhost:5432/ngb?ApplicationName=ngb_storagemanager_writer"
   username: ngb
   password: ngb
   hikari:
     minimumIdle: 5
     maximumPoolSize: 20
     idleTimeout: 30000
     poolName: SpringBootHikariCP_Writer
     maxLifetime: 2000000
     connectionTimeout: 30000