dcshah2002

thingsboard.yml

Jan 14th, 2024
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 113.26 KB | Software | 0 0
  1. #
  2. # Copyright © 2016-2023 The Thingsboard Authors
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. #     http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16.  
  17. # Server common parameters
  18. server:
  19.  # Server bind-address
  20.   address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
  21.   # Server bind port
  22.   port: "${HTTP_BIND_PORT:8080}"
  23.   # Server forward headers strategy
  24.   forward_headers_strategy: "${HTTP_FORWARD_HEADERS_STRATEGY:NONE}"
  25.   # Server SSL configuration
  26.   ssl:
  27.    # Enable/disable SSL support
  28.     enabled: "${SSL_ENABLED:false}"
  29.     # Server SSL credentials
  30.     credentials:
  31.      # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
  32.       type: "${SSL_CREDENTIALS_TYPE:PEM}"
  33.       # PEM server credentials
  34.       pem:
  35.        # Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
  36.         cert_file: "${SSL_PEM_CERT:server.pem}"
  37.         # Path to the server certificate private key file (optional). Required if the private key is not present in the server certificate file
  38.         key_file: "${SSL_PEM_KEY:server_key.pem}"
  39.         # Server certificate private key password (optional)
  40.         key_password: "${SSL_PEM_KEY_PASSWORD:server_key_password}"
  41.       # Keystore server credentials
  42.       keystore:
  43.        # Type of the key store (JKS or PKCS12)
  44.         type: "${SSL_KEY_STORE_TYPE:PKCS12}"
  45.         # Path to the key store that holds the SSL certificate
  46.         store_file: "${SSL_KEY_STORE:classpath:keystore/keystore.p12}"
  47.         # Password used to access the key store
  48.         store_password: "${SSL_KEY_STORE_PASSWORD:thingsboard}"
  49.         # Key alias
  50.         key_alias: "${SSL_KEY_ALIAS:tomcat}"
  51.         # Password used to access the key
  52.         key_password: "${SSL_KEY_PASSWORD:thingsboard}"
  53.   # HTTP/2 support (takes effect only if server SSL is enabled)
  54.   http2:
  55.    # Enable/disable HTTP/2 support
  56.     enabled: "${HTTP2_ENABLED:true}"
  57.   # Log errors with stacktrace when REST API throws an exception with the message "Please contact sysadmin"
  58.   log_controller_error_stack_trace: "${HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE:false}"
  59.   ws:
  60.    # Timeout for sending data to client WebSocket session in milliseconds
  61.     send_timeout: "${TB_SERVER_WS_SEND_TIMEOUT:5000}"
  62.     # recommended timeout >= 30 seconds. The platform will attempt to send a 'ping' request 3 times within the timeout
  63.     ping_timeout: "${TB_SERVER_WS_PING_TIMEOUT:30000}"
  64.     dynamic_page_link:
  65.      # Refresh rate of the dynamic alarm end entity data queries
  66.       refresh_interval: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_INTERVAL_SEC:60}"
  67.       # Thread pool size to execute dynamic queries
  68.       refresh_pool_size: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_REFRESH_POOL_SIZE:1}"
  69.       # Maximum number of dynamic queries per refresh interval. For example, no more than 10 alarm queries are executed by the user simultaneously in all browsers.
  70.       max_alarm_queries_per_refresh_interval: "${TB_SERVER_WS_MAX_ALARM_QUERIES_PER_REFRESH_INTERVAL:10}"
  71.       # Maximum number of dynamic queries per user. For example, no more than 10 alarm widgets opened by the user simultaneously in all browsers
  72.       max_per_user: "${TB_SERVER_WS_DYNAMIC_PAGE_LINK_MAX_PER_USER:10}"
  73.     # Maximum number of entities returned for single entity subscription. For example, no more than 10,000 entities on the map widget
  74.     max_entities_per_data_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_DATA_SUBSCRIPTION:10000}"
  75.     # Maximum number of alarms returned for single alarm subscription. For example, no more than 10,000 alarms on the alarm widget
  76.     max_entities_per_alarm_subscription: "${TB_SERVER_WS_MAX_ENTITIES_PER_ALARM_SUBSCRIPTION:10000}"
  77.     # Maximum queue size of the websocket updates per session. This restriction prevents infinite updates of WS
  78.     max_queue_messages_per_session: "${TB_SERVER_WS_DEFAULT_QUEUE_MESSAGES_PER_SESSION:1000}"
  79.     # Maximum time between WS session opening and sending auth command
  80.     auth_timeout_ms: "${TB_SERVER_WS_AUTH_TIMEOUT_MS:10000}"
  81.   rest:
  82.     server_side_rpc:
  83.      # Minimum value of the server-side RPC timeout. May override value provided in the REST API call.
  84.       # Since 2.5 migration to queues, the RPC delay depends on the size of the pending messages in the queue.
  85.       # So default UI parameter of 500ms may not be sufficient for loaded environments.
  86.       min_timeout: "${MIN_SERVER_SIDE_RPC_TIMEOUT:5000}"
  87.       # Default value of the server-side RPC timeout.
  88.       default_timeout: "${DEFAULT_SERVER_SIDE_RPC_TIMEOUT:10000}"
  89.     rate_limits:
  90.      # Limit that prohibits resetting the password for the user too often. The value of the rate limit. By default, no more than 5 requests per hour
  91.       reset_password_per_user: "${RESET_PASSWORD_PER_USER_RATE_LIMIT_CONFIGURATION:5:3600}"
  92.  
  93. # Application info parameters
  94. app:
  95.  # Application version
  96.   version: "3.6.2"
  97.  
  98. # Zookeeper connection parameters
  99. zk:
  100.  # Enable/disable zookeeper discovery service.
  101.   enabled: "${ZOOKEEPER_ENABLED:false}"
  102.   # Zookeeper connect string
  103.   url: "${ZOOKEEPER_URL:localhost:2181}"
  104.   # Zookeeper retry interval in milliseconds
  105.   retry_interval_ms: "${ZOOKEEPER_RETRY_INTERVAL_MS:3000}"
  106.   # Zookeeper connection timeout in milliseconds
  107.   connection_timeout_ms: "${ZOOKEEPER_CONNECTION_TIMEOUT_MS:3000}"
  108.   # Zookeeper session timeout in milliseconds
  109.   session_timeout_ms: "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
  110.   # Name of the directory in zookeeper 'filesystem'
  111.   zk_dir: "${ZOOKEEPER_NODES_DIR:/thingsboard}"
  112.   # The recalculate_delay property is recommended in a microservices architecture setup for rule-engine services.
  113.   # This property provides a pause to ensure that when a rule-engine service is restarted, other nodes don't immediately attempt to recalculate their partitions.
  114.   # The delay is recommended because the initialization of rule chain actors is time-consuming. Avoiding unnecessary recalculations during a restart can enhance system performance and stability.
  115.   recalculate_delay: "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
  116.  
  117. # Cluster parameters
  118. cluster:
  119.   stats:
  120.    # Enable/Disable the cluster statistics. Calculates the number of messages sent between cluster nodes based on each type
  121.     enabled: "${TB_CLUSTER_STATS_ENABLED:false}"
  122.     # Interval of printing the cluster stats to the log file
  123.     print_interval_ms: "${TB_CLUSTER_STATS_PRINT_INTERVAL_MS:10000}"
  124.  
  125. # Plugins configuration parameters
  126. plugins:
  127.  # Comma-separated package list used during classpath scanning for plugins
  128.   scan_packages: "${PLUGINS_SCAN_PACKAGES:org.thingsboard.server.extensions,org.thingsboard.rule.engine}"
  129.  
  130. # Security parameters
  131. security:
  132.  # JWT Token parameters
  133.   jwt: # Since 3.4.2 values are persisted in the database during installation or upgrade. On Install, the key will be generated randomly if no custom value set. You can change it later from Web UI under SYS_ADMIN
  134.     tokenExpirationTime: "${JWT_TOKEN_EXPIRATION_TIME:9000}" # Number of seconds (2.5 hours)
  135.     refreshTokenExpTime: "${JWT_REFRESH_TOKEN_EXPIRATION_TIME:604800}" # Number of seconds (1 week).
  136.     tokenIssuer: "${JWT_TOKEN_ISSUER:thingsboard.io}" # User JWT Token issuer
  137.     tokenSigningKey: "${JWT_TOKEN_SIGNING_KEY:thingsboardDefaultSigningKey}" # Base64 encoded
  138.   # Enable/disable access to Tenant Administrators JWT token by System Administrator or Customer Users JWT token by Tenant Administrator
  139.   user_token_access_enabled: "${SECURITY_USER_TOKEN_ACCESS_ENABLED:true}"
  140.   # Enable/disable case-sensitive username login
  141.   user_login_case_sensitive: "${SECURITY_USER_LOGIN_CASE_SENSITIVE:true}"
  142.   claim:
  143.    # Enable/disable claiming devices; if false -> the device's [claimingAllowed] SERVER_SCOPE attribute must be set to [true] to allow claiming the specific device
  144.     allowClaimingByDefault: "${SECURITY_CLAIM_ALLOW_CLAIMING_BY_DEFAULT:true}"
  145.     # Time allowed to claim the device in milliseconds
  146.     duration: "${SECURITY_CLAIM_DURATION:86400000}" # 1 minute, note this value must equal claimDevices.timeToLiveInMinutes value
  147.   basic:
  148.    # Enable/Disable basic security options
  149.     enabled: "${SECURITY_BASIC_ENABLED:false}"
  150.   oauth2:
  151.    # Redirect URL where access code from external user management system will be processed
  152.     loginProcessingUrl: "${SECURITY_OAUTH2_LOGIN_PROCESSING_URL:/login/oauth2/code/}"
  153.     githubMapper:
  154.      # The email addresses that will be mapped from the URL
  155.       emailUrl: "${SECURITY_OAUTH2_GITHUB_MAPPER_EMAIL_URL_KEY:https://api.github.com/user/emails}"
  156.   java_cacerts:
  157.    # CA certificates keystore default path. Typically this keystore is at JAVA_HOME/lib/security/cacerts
  158.     path: "${SECURITY_JAVA_CACERTS_PATH:${java.home}/lib/security/cacerts}"
  159.     # The password of the cacerts keystore file
  160.     password: "${SECURITY_JAVA_CACERTS_PASSWORD:changeit}"
  161.  
  162. # Mail settings parameters
  163. mail:
  164.   oauth2:
  165.    # Interval for checking refresh token expiration in seconds(by default, 1 day).
  166.     refreshTokenCheckingInterval: "${REFRESH_TOKEN_EXPIRATION_CHECKING_INTERVAL:86400}"
  167.  
  168. # Usage statistics parameters
  169. usage:
  170.   stats:
  171.     report:
  172.      # Enable/Disable the collection of API usage statistics. Collected on a system and tenant level by default
  173.       enabled: "${USAGE_STATS_REPORT_ENABLED:true}"
  174.       # Enable/Disable the collection of API usage statistics on a customer level
  175.       enabled_per_customer: "${USAGE_STATS_REPORT_PER_CUSTOMER_ENABLED:false}"
  176.       # Statistics reporting interval, set to send summarized data every 10 seconds by default
  177.       interval: "${USAGE_STATS_REPORT_INTERVAL:10}"
  178.     check:
  179.      # Interval of checking the start of the next cycle and re-enabling the blocked tenants/customers
  180.       cycle: "${USAGE_STATS_CHECK_CYCLE:60000}"
  181.     # In milliseconds. The default value is 3 minutes
  182.     gauge_report_interval: "${USAGE_STATS_GAUGE_REPORT_INTERVAL:180000}"
  183.     devices:
  184.      # In seconds, the default value is 1 minute. When changing, in cluster mode, make sure usage.stats.gauge_report_interval is set to x2-x3 of this value
  185.       report_interval: "${DEVICES_STATS_REPORT_INTERVAL:60}"
  186.  
  187. # UI settings parameters
  188. ui:
  189.  # Dashboard parameters
  190.   dashboard:
  191.    # Maximum allowed datapoints fetched by widgets
  192.     max_datapoints_limit: "${DASHBOARD_MAX_DATAPOINTS_LIMIT:50000}"
  193.   # Help parameters
  194.   help:
  195.    # Base URL for UI help assets
  196.     base-url: "${UI_HELP_BASE_URL:https://raw.githubusercontent.com/thingsboard/thingsboard-ui-help/release-3.6.2}"
  197.  
  198. # Database telemetry parameters
  199. database:
  200.   ts_max_intervals: "${DATABASE_TS_MAX_INTERVALS:700}" # Max number of DB queries generated by a single API call to fetch telemetry records
  201.   ts:
  202.     type: "${DATABASE_TS_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale)
  203.   ts_latest:
  204.     type: "${DATABASE_TS_LATEST_TYPE:sql}" # cassandra, sql, or timescale (for hybrid mode, DATABASE_TS_TYPE value should be cassandra, or timescale)
  205.  
  206. # Cassandra driver configuration parameters
  207. cassandra:
  208.  # Thingsboard cluster name
  209.   cluster_name: "${CASSANDRA_CLUSTER_NAME:Thingsboard Cluster}"
  210.   # Thingsboard keyspace name
  211.   keyspace_name: "${CASSANDRA_KEYSPACE_NAME:thingsboard}"
  212.   # Specify node list
  213.   url: "${CASSANDRA_URL:127.0.0.1:9042}"
  214.   # Specify the local data center name
  215.   local_datacenter: "${CASSANDRA_LOCAL_DATACENTER:datacenter1}"
  216.   ssl:
  217.    # Enable/disable secure connection
  218.     enabled: "${CASSANDRA_USE_SSL:false}"
  219.     # Enable/disable validation of Cassandra server hostname
  220.     # If enabled, the hostname of the Cassandra server must match the CN of the server certificate
  221.     hostname_validation: "${CASSANDRA_SSL_HOSTNAME_VALIDATION:true}"
  222.     # Set trust store for client authentication of the server (optional, uses trust store from default SSLContext if not set)
  223.     trust_store: "${CASSANDRA_SSL_TRUST_STORE:}"
  224.     # The password for Cassandra trust store key
  225.     trust_store_password: "${CASSANDRA_SSL_TRUST_STORE_PASSWORD:}"
  226.     # Set key store for server authentication of the client (optional, uses key store from default SSLContext if not set)
  227.     # A key store is only needed if the Cassandra server requires client authentication
  228.     key_store: "${CASSANDRA_SSL_KEY_STORE:}"
  229.     # The password for the Cassandra key store
  230.     key_store_password: "${CASSANDRA_SSL_KEY_STORE_PASSWORD:}"
  231.     # Comma-separated list of cipher suites (optional, uses Java default cipher suites if not set)
  232.     cipher_suites: "${CASSANDRA_SSL_CIPHER_SUITES:}"
  233.   # Enable/disable JMX
  234.   jmx: "${CASSANDRA_USE_JMX:false}"
  235.   # Enable/disable metrics collection.
  236.   metrics: "${CASSANDRA_USE_METRICS:false}"
  237.   # NONE SNAPPY LZ4
  238.   compression: "${CASSANDRA_COMPRESSION:none}"
  239.   # Specify cassandra cluster initialization timeout in milliseconds (if no hosts are available during startup)
  240.   init_timeout_ms: "${CASSANDRA_CLUSTER_INIT_TIMEOUT_MS:300000}"
  241.   # Specify cassandra cluster initialization retry interval (if no hosts available during startup)
  242.   init_retry_interval_ms: "${CASSANDRA_CLUSTER_INIT_RETRY_INTERVAL_MS:3000}"
  243.   # Cassandra max local requests per connection
  244.   max_requests_per_connection_local: "${CASSANDRA_MAX_REQUESTS_PER_CONNECTION_LOCAL:32768}"
  245.   # Cassandra max remote requests per connection
  246.   max_requests_per_connection_remote: "${CASSANDRA_MAX_REQUESTS_PER_CONNECTION_REMOTE:32768}"
  247.   # Credential parameters
  248.   credentials: "${CASSANDRA_USE_CREDENTIALS:false}"
  249.   # Specify your username
  250.   username: "${CASSANDRA_USERNAME:}"
  251.   # Specify your password
  252.   password: "${CASSANDRA_PASSWORD:}"
  253.   # Astra DB connect https://astra.datastax.com/
  254.   cloud:
  255.    # /etc/thingsboard/astra/secure-connect-thingsboard.zip
  256.     secure_connect_bundle_path: "${CASSANDRA_CLOUD_SECURE_BUNDLE_PATH:}"
  257.     # DucitQPHMzPCBOZqFYexAfKk
  258.     client_id: "${CASSANDRA_CLOUD_CLIENT_ID:}"
  259.     # ZnF7FpuHp43FP5BzM+KY8wGmSb4Ql6BhT4Z7sOU13ze+gXQ-n7OkFpNuB,oACUIQObQnK0g4bSPoZhK5ejkcF9F.j6f64j71Sr.tiRe0Fsq2hPS1ZCGSfAaIgg63IydG
  260.     client_secret: "${CASSANDRA_CLOUD_CLIENT_SECRET:}"
  261.  
  262.   # Cassandra cluster connection socket parameters #
  263.   socket:
  264.    # Sets the timeout, in milliseconds, of a native connection from ThingsBoard to Cassandra. The default value is 5000
  265.     connect_timeout: "${CASSANDRA_SOCKET_TIMEOUT:5000}"
  266.     # Timeout before closing the connection. Value set in milliseconds
  267.     read_timeout: "${CASSANDRA_SOCKET_READ_TIMEOUT:20000}"
  268.     # Gets if TCP keep-alive must be used
  269.     keep_alive: "${CASSANDRA_SOCKET_KEEP_ALIVE:true}"
  270.     # Enable/Disable reuse-address. The socket option allows for the reuse of local addresses and ports
  271.     reuse_address: "${CASSANDRA_SOCKET_REUSE_ADDRESS:true}"
  272.     # Sets the linger-on-close timeout. By default, this option is not set by the driver. The actual value will be the default from the underlying Netty transport
  273.     so_linger: "${CASSANDRA_SOCKET_SO_LINGER:}"
  274.     # Enable/Disable Nagle's algorithm
  275.     tcp_no_delay: "${CASSANDRA_SOCKET_TCP_NO_DELAY:false}"
  276.     # Sets a hint to the size of the underlying buffers for incoming network I/O. By default, this option is not set by the driver. The actual value will be the default from the underlying Netty transport
  277.     receive_buffer_size: "${CASSANDRA_SOCKET_RECEIVE_BUFFER_SIZE:}"
  278.     # Returns the hint to the size of the underlying buffers for outgoing network I/O. By default, this option is not set by the driver. The actual value will be the default from the underlying Netty transport
  279.     send_buffer_size: "${CASSANDRA_SOCKET_SEND_BUFFER_SIZE:}"
  280.  
  281.   # Cassandra cluster connection query parameters
  282.   query:
  283.    # Consistency levels in Cassandra can be configured to manage availability versus data accuracy. The consistency level defaults to ONE for all write and read operations
  284.     read_consistency_level: "${CASSANDRA_READ_CONSISTENCY_LEVEL:ONE}"
  285.     # Consistency levels in Cassandra can be configured to manage availability versus data accuracy. The consistency level defaults to ONE for all write and read operations
  286.     write_consistency_level: "${CASSANDRA_WRITE_CONSISTENCY_LEVEL:ONE}"
  287.     # The fetch size specifies how many rows will be returned at once by Cassandra (in other words, it’s the size of each page)
  288.     default_fetch_size: "${CASSANDRA_DEFAULT_FETCH_SIZE:2000}"
  289.     # Specify partitioning size for timestamp key-value storage. Example: MINUTES, HOURS, DAYS, MONTHS, INDEFINITE
  290.     ts_key_value_partitioning: "${TS_KV_PARTITIONING:MONTHS}"
  291.     # Enable/Disable timestamp key-value partioning on read queries
  292.     use_ts_key_value_partitioning_on_read: "${USE_TS_KV_PARTITIONING_ON_READ:true}"
  293.     # The number of partitions that are cached in memory of each service. It is useful to decrease the load of re-inserting the same partitions again
  294.     ts_key_value_partitions_max_cache_size: "${TS_KV_PARTITIONS_MAX_CACHE_SIZE:100000}"
  295.     # Timeseries Time To Live (in seconds) for Cassandra Record. 0 - record has never expired
  296.     ts_key_value_ttl: "${TS_KV_TTL:0}"
  297.     # Maximum number of Cassandra queries that are waiting for execution
  298.     buffer_size: "${CASSANDRA_QUERY_BUFFER_SIZE:200000}"
  299.     # Maximum number of concurrent Cassandra queries
  300.     concurrent_limit: "${CASSANDRA_QUERY_CONCURRENT_LIMIT:1000}"
  301.     # Max time in milliseconds query waits for execution
  302.     permit_max_wait_time: "${PERMIT_MAX_WAIT_TIME:120000}"
  303.     # Amount of threads to dispatch cassandra queries
  304.     dispatcher_threads: "${CASSANDRA_QUERY_DISPATCHER_THREADS:2}"
  305.     callback_threads: "${CASSANDRA_QUERY_CALLBACK_THREADS:4}" # Buffered rate executor (read, write) for managing I/O rate. See "nosql-*-callback" threads in JMX
  306.     result_processing_threads: "${CASSANDRA_QUERY_RESULT_PROCESSING_THREADS:50}" # Result set transformer and processing. See "cassandra-callback" threads in JMX
  307.     # Cassandra query queue polling interval in milliseconds
  308.     poll_ms: "${CASSANDRA_QUERY_POLL_MS:50}"
  309.     # Interval in milliseconds for printing Cassandra query queue statistic
  310.     rate_limit_print_interval_ms: "${CASSANDRA_QUERY_RATE_LIMIT_PRINT_MS:10000}"
  311.     # set all data type values except target to null for the same ts on save
  312.     set_null_values_enabled: "${CASSANDRA_QUERY_SET_NULL_VALUES_ENABLED:false}"
  313.     # log one of cassandra queries with specified frequency (0 - logging is disabled)
  314.     print_queries_freq: "${CASSANDRA_QUERY_PRINT_FREQ:0}"
  315.     tenant_rate_limits:
  316.      # Whether to print rate-limited tenant names when printing Cassandra query queue statistic
  317.       print_tenant_names: "${CASSANDRA_QUERY_TENANT_RATE_LIMITS_PRINT_TENANT_NAMES:false}"
  318.  
  319. # SQL configuration parameters
  320. sql:
  321.  # Specify batch size for persisting attribute updates
  322.   attributes:
  323.     batch_size: "${SQL_ATTRIBUTES_BATCH_SIZE:1000}" # Batch size for persisting attribute updates
  324.     batch_max_delay: "${SQL_ATTRIBUTES_BATCH_MAX_DELAY_MS:50}" # Max timeout for attributes entries queue polling. The value is set in milliseconds
  325.     stats_print_interval_ms: "${SQL_ATTRIBUTES_BATCH_STATS_PRINT_MS:10000}" # Interval in milliseconds for printing attributes updates statistic
  326.     batch_threads: "${SQL_ATTRIBUTES_BATCH_THREADS:3}" # batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
  327.     value_no_xss_validation: "${SQL_ATTRIBUTES_VALUE_NO_XSS_VALIDATION:false}" # If true attribute values will be checked for XSS vulnerability
  328.   ts:
  329.     batch_size: "${SQL_TS_BATCH_SIZE:10000}" # Batch size for persisting timeseries inserts
  330.     batch_max_delay: "${SQL_TS_BATCH_MAX_DELAY_MS:100}" # Max timeout for time-series entries queue polling. The value set in milliseconds
  331.     stats_print_interval_ms: "${SQL_TS_BATCH_STATS_PRINT_MS:10000}" # Interval in milliseconds for printing timeseries insert statistic
  332.     batch_threads: "${SQL_TS_BATCH_THREADS:3}" # batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
  333.     value_no_xss_validation: "${SQL_TS_VALUE_NO_XSS_VALIDATION:false}" # If true telemetry values will be checked for XSS vulnerability
  334.   ts_latest:
  335.     batch_size: "${SQL_TS_LATEST_BATCH_SIZE:1000}" # Batch size for persisting latest telemetry updates
  336.     batch_max_delay: "${SQL_TS_LATEST_BATCH_MAX_DELAY_MS:50}" # Maximum timeout for latest telemetry entries queue polling. The value set in milliseconds
  337.     stats_print_interval_ms: "${SQL_TS_LATEST_BATCH_STATS_PRINT_MS:10000}" # Interval in milliseconds for printing latest telemetry updates statistic
  338.     batch_threads: "${SQL_TS_LATEST_BATCH_THREADS:3}" # batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
  339.     update_by_latest_ts: "${SQL_TS_UPDATE_BY_LATEST_TIMESTAMP:true}" # Update latest values only if the timestamp of the new record is greater or equals the timestamp of the previously saved latest value. The latest values are stored separately from historical values for fast lookup from DB. Insert of historical value happens in any case
  340.   events:
  341.     batch_size: "${SQL_EVENTS_BATCH_SIZE:10000}" # Batch size for persisting latest telemetry updates
  342.     batch_max_delay: "${SQL_EVENTS_BATCH_MAX_DELAY_MS:100}" # Max timeout for latest telemetry entries queue polling. The value set in milliseconds
  343.     stats_print_interval_ms: "${SQL_EVENTS_BATCH_STATS_PRINT_MS:10000}" # Interval in milliseconds for printing latest telemetry updates statistic
  344.     batch_threads: "${SQL_EVENTS_BATCH_THREADS:3}" # batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
  345.     partition_size: "${SQL_EVENTS_REGULAR_PARTITION_SIZE_HOURS:168}" # Number of hours to partition the events. The current value corresponds to one week.
  346.     debug_partition_size: "${SQL_EVENTS_DEBUG_PARTITION_SIZE_HOURS:1}" # Number of hours to partition the debug events. The current value corresponds to one hour.
  347.   edge_events:
  348.     batch_size: "${SQL_EDGE_EVENTS_BATCH_SIZE:1000}" # Batch size for persisting latest telemetry updates
  349.     batch_max_delay: "${SQL_EDGE_EVENTS_BATCH_MAX_DELAY_MS:100}" # Max timeout for latest telemetry entries queue polling. The value set in milliseconds
  350.     stats_print_interval_ms: "${SQL_EDGE_EVENTS_BATCH_STATS_PRINT_MS:10000}" # Interval in milliseconds for printing latest telemetry updates statistic
  351.     partition_size: "${SQL_EDGE_EVENTS_PARTITION_SIZE_HOURS:168}" # Number of hours to partition the events. The current value corresponds to one week.
  352.   audit_logs:
  353.     partition_size: "${SQL_AUDIT_LOGS_PARTITION_SIZE_HOURS:168}" # Default value - 1 week
  354.   alarm_comments:
  355.     partition_size: "${SQL_ALARM_COMMENTS_PARTITION_SIZE_HOURS:168}" # Default value - 1 week
  356.   notifications:
  357.     partition_size: "${SQL_NOTIFICATIONS_PARTITION_SIZE_HOURS:168}" # Default value - 1 week
  358.   # Specify whether to sort entities before batch update. Should be enabled for cluster mode to avoid deadlocks
  359.   batch_sort: "${SQL_BATCH_SORT:true}"
  360.   # Specify whether to remove null characters from strValue of attributes and timeseries before insert
  361.   remove_null_chars: "${SQL_REMOVE_NULL_CHARS:true}"
  362.   # Specify whether to log database queries and their parameters generated by the entity query repository
  363.   log_queries: "${SQL_LOG_QUERIES:false}"
  364.   # Threshold of slow SQL queries to log. The value set in milliseconds
  365.   log_queries_threshold: "${SQL_LOG_QUERIES_THRESHOLD:5000}"
  366.   # Enable/Disable logging statistic information about tenants
  367.   log_tenant_stats: "${SQL_LOG_TENANT_STATS:true}"
  368.   # Interval in milliseconds for printing the latest statistic information about the tenant
  369.   log_tenant_stats_interval_ms: "${SQL_LOG_TENANT_STATS_INTERVAL_MS:60000}"
  370.   postgres:
  371.    # Specify partitioning size for timestamp key-value storage. Example: DAYS, MONTHS, YEARS, INDEFINITE.
  372.     ts_key_value_partitioning: "${SQL_POSTGRES_TS_KV_PARTITIONING:MONTHS}"
  373.   timescale:
  374.    # Specify Interval size for new data chunks storage.
  375.     chunk_time_interval: "${SQL_TIMESCALE_CHUNK_TIME_INTERVAL:604800000}"
  376.     batch_threads: "${SQL_TIMESCALE_BATCH_THREADS:3}" # batch thread count has to be a prime number like 3 or 5 to gain perfect hash distribution
  377.   ttl:
  378.     ts:
  379.      # Enable/disable TTL (Time To Live) for timeseries records
  380.       enabled: "${SQL_TTL_TS_ENABLED:true}"
  381.       execution_interval_ms: "${SQL_TTL_TS_EXECUTION_INTERVAL:86400000}" # Number of milliseconds. The current value corresponds to one day
  382.       ts_key_value_ttl: "${SQL_TTL_TS_TS_KEY_VALUE_TTL:0}" # Number of seconds
  383.     events:
  384.      # Enable/disable TTL (Time To Live) for event records
  385.       enabled: "${SQL_TTL_EVENTS_ENABLED:true}"
  386.       execution_interval_ms: "${SQL_TTL_EVENTS_EXECUTION_INTERVAL:3600000}" # Number of milliseconds (max random initial delay and fixed period).
  387.       # Number of seconds. TTL is disabled by default. The accuracy of the cleanup depends on the sql.events.partition_size parameter.
  388.       events_ttl: "${SQL_TTL_EVENTS_EVENTS_TTL:0}"
  389.       # Number of seconds. The current value corresponds to one week. The accuracy of the cleanup depends on the sql.events.debug_partition_size parameter.
  390.       debug_events_ttl: "${SQL_TTL_EVENTS_DEBUG_EVENTS_TTL:604800}"
  391.     edge_events:
  392.       enabled: "${SQL_TTL_EDGE_EVENTS_ENABLED:true}" # Enable/disable TTL (Time To Live) for edge event records
  393.       execution_interval_ms: "${SQL_TTL_EDGE_EVENTS_EXECUTION_INTERVAL:86400000}" # Number of milliseconds. The current value corresponds to one day
  394.       edge_events_ttl: "${SQL_TTL_EDGE_EVENTS_TTL:2628000}" # Number of seconds. The current value corresponds to one month
  395.     alarms:
  396.       checking_interval: "${SQL_ALARMS_TTL_CHECKING_INTERVAL:7200000}" # Number of milliseconds. The current value corresponds to two hours
  397.       removal_batch_size: "${SQL_ALARMS_TTL_REMOVAL_BATCH_SIZE:3000}" # To delete outdated alarms not all at once but in batches
  398.     rpc:
  399.       enabled: "${SQL_TTL_RPC_ENABLED:true}" # Enable/disable TTL (Time To Live) for rpc call records
  400.       checking_interval: "${SQL_RPC_TTL_CHECKING_INTERVAL:7200000}" # Number of milliseconds. The current value corresponds to two hours
  401.     audit_logs:
  402.       enabled: "${SQL_TTL_AUDIT_LOGS_ENABLED:true}" # Enable/disable TTL (Time To Live) for audit log records
  403.       ttl: "${SQL_TTL_AUDIT_LOGS_SECS:0}" # Disabled by default. The accuracy of the cleanup depends on the sql.audit_logs.partition_size
  404.       checking_interval_ms: "${SQL_TTL_AUDIT_LOGS_CHECKING_INTERVAL_MS:86400000}" # Default value - 1 day
  405.     notifications:
  406.       enabled: "${SQL_TTL_NOTIFICATIONS_ENABLED:true}" # Enable/disable TTL (Time To Live) for notification center records
  407.       ttl: "${SQL_TTL_NOTIFICATIONS_SECS:2592000}" # Default value - 30 days
  408.       checking_interval_ms: "${SQL_TTL_NOTIFICATIONS_CHECKING_INTERVAL_MS:86400000}" # Default value - 1 day
  409.   relations:
  410.     max_level: "${SQL_RELATIONS_MAX_LEVEL:50}" # This value has to be reasonably small to prevent infinite recursion as early as possible
  411.     pool_size: "${SQL_RELATIONS_POOL_SIZE:4}" # This value has to be reasonably small to prevent the relation query from blocking all other DB calls
  412.     query_timeout: "${SQL_RELATIONS_QUERY_TIMEOUT_SEC:20}" # This value has to be reasonably small to prevent the relation query from blocking all other DB calls
  413.  
  414. # Actor system parameters
  415. actors:
  416.   system:
  417.     throughput: "${ACTORS_SYSTEM_THROUGHPUT:5}" # Number of messages the actor system will process per actor before switching to processing of messages for the next actor
  418.     scheduler_pool_size: "${ACTORS_SYSTEM_SCHEDULER_POOL_SIZE:1}" # Thread pool size for actor system scheduler
  419.     max_actor_init_attempts: "${ACTORS_SYSTEM_MAX_ACTOR_INIT_ATTEMPTS:10}" # Maximum number of attempts to init the actor before disabling the actor
  420.     app_dispatcher_pool_size: "${ACTORS_SYSTEM_APP_DISPATCHER_POOL_SIZE:1}" # Thread pool size for main actor system dispatcher
  421.     tenant_dispatcher_pool_size: "${ACTORS_SYSTEM_TENANT_DISPATCHER_POOL_SIZE:2}" # Thread pool size for actor system dispatcher that process messages for tenant actors
  422.     device_dispatcher_pool_size: "${ACTORS_SYSTEM_DEVICE_DISPATCHER_POOL_SIZE:4}" # Thread pool size for actor system dispatcher that process messages for device actors
  423.     rule_dispatcher_pool_size: "${ACTORS_SYSTEM_RULE_DISPATCHER_POOL_SIZE:8}" # Thread pool size for actor system dispatcher that process messages for rule engine (chain/node) actors
  424.     edge_dispatcher_pool_size: "${ACTORS_SYSTEM_EDGE_DISPATCHER_POOL_SIZE:4}" # Thread pool size for actor system dispatcher that process messages for edge actors
  425.   tenant:
  426.     create_components_on_init: "${ACTORS_TENANT_CREATE_COMPONENTS_ON_INIT:true}" # Create components in initialization
  427.   session:
  428.     max_concurrent_sessions_per_device: "${ACTORS_MAX_CONCURRENT_SESSION_PER_DEVICE:1}" # Max number of concurrent sessions per device
  429.     sync:
  430.      # Default timeout for processing requests using synchronous session (HTTP, CoAP) in milliseconds
  431.       timeout: "${ACTORS_SESSION_SYNC_TIMEOUT:10000}"
  432.   rule:
  433.    # Specify thread pool size for database request callbacks executor service
  434.     db_callback_thread_pool_size: "${ACTORS_RULE_DB_CALLBACK_THREAD_POOL_SIZE:50}"
  435.     # Specify thread pool size for mail sender executor service
  436.     mail_thread_pool_size: "${ACTORS_RULE_MAIL_THREAD_POOL_SIZE:40}"
  437.     # Specify thread pool size for password reset emails
  438.     mail_password_reset_thread_pool_size: "${ACTORS_RULE_MAIL_PASSWORD_RESET_THREAD_POOL_SIZE:10}"
  439.     # Specify thread pool size for sms sender executor service
  440.     sms_thread_pool_size: "${ACTORS_RULE_SMS_THREAD_POOL_SIZE:50}"
  441.     # Whether to allow usage of system mail service for rules
  442.     allow_system_mail_service: "${ACTORS_RULE_ALLOW_SYSTEM_MAIL_SERVICE:true}"
  443.     # Whether to allow usage of system sms service for rules
  444.     allow_system_sms_service: "${ACTORS_RULE_ALLOW_SYSTEM_SMS_SERVICE:true}"
  445.     # Specify thread pool size for external call service
  446.     external_call_thread_pool_size: "${ACTORS_RULE_EXTERNAL_CALL_THREAD_POOL_SIZE:50}"
  447.     chain:
  448.      # Errors for particular actors are persisted once per specified amount of milliseconds
  449.       error_persist_frequency: "${ACTORS_RULE_CHAIN_ERROR_FREQUENCY:3000}"
  450.       debug_mode_rate_limits_per_tenant:
  451.        # Enable/Disable the rate limit of persisted debug events for all rule nodes per tenant
  452.         enabled: "${ACTORS_RULE_CHAIN_DEBUG_MODE_RATE_LIMITS_PER_TENANT_ENABLED:true}"
  453.         # The value of DEBUG mode rate limit. By default, no more then 50 thousand events per hour
  454.         configuration: "${ACTORS_RULE_CHAIN_DEBUG_MODE_RATE_LIMITS_PER_TENANT_CONFIGURATION:50000:3600}"
  455.     node:
  456.      # Errors for particular actor are persisted once per specified amount of milliseconds
  457.       error_persist_frequency: "${ACTORS_RULE_NODE_ERROR_FREQUENCY:3000}"
  458.     transaction:
  459.      # Size of queues that store messages for transaction rule nodes
  460.       queue_size: "${ACTORS_RULE_TRANSACTION_QUEUE_SIZE:15000}"
  461.       # Time in milliseconds for transaction to complete
  462.       duration: "${ACTORS_RULE_TRANSACTION_DURATION:60000}"
  463.     external:
  464.      # Force acknowledgment of the incoming message for external rule nodes to decrease processing latency.
  465.       # Enqueue the result of external node processing as a separate message to the rule engine.
  466.       force_ack: "${ACTORS_RULE_EXTERNAL_NODE_FORCE_ACK:false}"
  467.   rpc:
  468.    # Maximum number of persistent RPC call retries in case of failed request delivery.
  469.     max_retries: "${ACTORS_RPC_MAX_RETRIES:5}"
  470.     # RPC submit strategies. Allowed values: BURST, SEQUENTIAL_ON_ACK_FROM_DEVICE, SEQUENTIAL_ON_RESPONSE_FROM_DEVICE.
  471.     submit_strategy: "${ACTORS_RPC_SUBMIT_STRATEGY_TYPE:BURST}"
  472.     # Time in milliseconds for RPC to receive a response after delivery. Used only for SEQUENTIAL_ON_RESPONSE_FROM_DEVICE submit strategy.
  473.     response_timeout_ms: "${ACTORS_RPC_RESPONSE_TIMEOUT_MS:30000}"
  474.   statistics:
  475.    # Enable/disable actor statistics
  476.     enabled: "${ACTORS_STATISTICS_ENABLED:true}"
  477.     # Frequency of printing the JS executor statistics
  478.     js_print_interval_ms: "${ACTORS_JS_STATISTICS_PRINT_INTERVAL_MS:10000}"
  479.     # Actors statistic persistence frequency in milliseconds
  480.     persist_frequency: "${ACTORS_STATISTICS_PERSIST_FREQUENCY:3600000}"
  481.  
  482. # Cache settings parameters
  483. cache:
  484.  # caffeine or redis
  485.   type: "${CACHE_TYPE:caffeine}"
  486.   maximumPoolSize: "${CACHE_MAXIMUM_POOL_SIZE:16}" # max pool size to process futures that call the external cache
  487.   attributes:
  488.    # make sure that if cache.type is 'redis' and cache.attributes.enabled is 'true' if you change 'maxmemory-policy' Redis config property to 'allkeys-lru', 'allkeys-lfu' or 'allkeys-random'
  489.     enabled: "${CACHE_ATTRIBUTES_ENABLED:true}"
  490.   specs:
  491.     relations:
  492.       timeToLiveInMinutes: "${CACHE_SPECS_RELATIONS_TTL:1440}" # Relations cache TTL
  493.       maxSize: "${CACHE_SPECS_RELATIONS_MAX_SIZE:10000}" # 0 means the cache is disabled
  494.     deviceCredentials:
  495.       timeToLiveInMinutes: "${CACHE_SPECS_DEVICE_CREDENTIALS_TTL:1440}" # Device credentials cache TTL
  496.       maxSize: "${CACHE_SPECS_DEVICE_CREDENTIALS_MAX_SIZE:10000}" # 0 means the cache is disabled
  497.     devices:
  498.       timeToLiveInMinutes: "${CACHE_SPECS_DEVICES_TTL:1440}" # Device cache TTL
  499.       maxSize: "${CACHE_SPECS_DEVICES_MAX_SIZE:10000}" # 0 means the cache is disabled
  500.     sessions:
  501.       timeToLiveInMinutes: "${CACHE_SPECS_SESSIONS_TTL:1440}" # Sessions cache TTL
  502.       maxSize: "${CACHE_SPECS_SESSIONS_MAX_SIZE:10000}" # 0 means the cache is disabled
  503.     assets:
  504.       timeToLiveInMinutes: "${CACHE_SPECS_ASSETS_TTL:1440}" # Asset cache TTL
  505.       maxSize: "${CACHE_SPECS_ASSETS_MAX_SIZE:10000}" # 0 means the cache is disabled
  506.     entityViews:
  507.       timeToLiveInMinutes: "${CACHE_SPECS_ENTITY_VIEWS_TTL:1440}" # Entity view cache TTL
  508.       maxSize: "${CACHE_SPECS_ENTITY_VIEWS_MAX_SIZE:10000}" # 0 means the cache is disabled
  509.     claimDevices:
  510.       timeToLiveInMinutes: "${CACHE_SPECS_CLAIM_DEVICES_TTL:1440}" # Claim devices cache TTL
  511.       maxSize: "${CACHE_SPECS_CLAIM_DEVICES_MAX_SIZE:1000}" # 0 means the cache is disabled
  512.     securitySettings:
  513.       timeToLiveInMinutes: "${CACHE_SPECS_SECURITY_SETTINGS_TTL:1440}" # Security settings cache TTL
  514.       maxSize: "${CACHE_SPECS_SECURITY_SETTINGS_MAX_SIZE:10000}" # 0 means the cache is disabled
  515.     tenantProfiles:
  516.       timeToLiveInMinutes: "${CACHE_SPECS_TENANT_PROFILES_TTL:1440}" # Tenant profiles cache TTL
  517.       maxSize: "${CACHE_SPECS_TENANT_PROFILES_MAX_SIZE:10000}" # 0 means the cache is disabled
  518.     tenants:
  519.       timeToLiveInMinutes: "${CACHE_SPECS_TENANTS_TTL:1440}" # Tenant cache TTL
  520.       maxSize: "${CACHE_SPECS_TENANTS_MAX_SIZE:10000}" # 0 means the cache is disabled
  521.     tenantsExist:
  522.      # Environment variables are intentionally the same as in 'tenants' cache to be equal.
  523.       timeToLiveInMinutes: "${CACHE_SPECS_TENANTS_TTL:1440}"
  524.       maxSize: "${CACHE_SPECS_TENANTS_MAX_SIZE:10000}" # 0 means the cache is disabled
  525.     deviceProfiles:
  526.       timeToLiveInMinutes: "${CACHE_SPECS_DEVICE_PROFILES_TTL:1440}" # Device profile cache TTL
  527.       maxSize: "${CACHE_SPECS_DEVICE_PROFILES_MAX_SIZE:10000}" # 0 means the cache is disabled
  528.     assetProfiles:
  529.       timeToLiveInMinutes: "${CACHE_SPECS_ASSET_PROFILES_TTL:1440}" # Asset profile cache TTL
  530.       maxSize: "${CACHE_SPECS_ASSET_PROFILES_MAX_SIZE:10000}" # 0 means the cache is disabled
  531.     notificationSettings:
  532.       timeToLiveInMinutes: "${CACHE_SPECS_NOTIFICATION_SETTINGS_TTL:10}" # Notification settings cache TTL
  533.       maxSize: "${CACHE_SPECS_NOTIFICATION_SETTINGS_MAX_SIZE:1000}" # 0 means the cache is disabled
  534.     sentNotifications:
  535.       timeToLiveInMinutes: "${CACHE_SPECS_SENT_NOTIFICATIONS_TTL:1440}" # Sent notifications cache TTL
  536.       maxSize: "${CACHE_SPECS_SENT_NOTIFICATIONS_MAX_SIZE:10000}" # 0 means the cache is disabled
  537.     attributes:
  538.       timeToLiveInMinutes: "${CACHE_SPECS_ATTRIBUTES_TTL:1440}" # Attributes cache TTL
  539.       maxSize: "${CACHE_SPECS_ATTRIBUTES_MAX_SIZE:100000}" # 0 means the cache is disabled
  540.     userSessionsInvalidation:
  541.      # The value of this TTL is ignored and replaced by the JWT refresh token expiration time
  542.       timeToLiveInMinutes: "0"
  543.       maxSize: "${CACHE_SPECS_USERS_UPDATE_TIME_MAX_SIZE:10000}" # 0 means the cache is disabled
  544.     otaPackages:
  545.       timeToLiveInMinutes: "${CACHE_SPECS_OTA_PACKAGES_TTL:60}" # Ota packages cache TTL
  546.       maxSize: "${CACHE_SPECS_OTA_PACKAGES_MAX_SIZE:10}" # 0 means the cache is disabled
  547.     otaPackagesData:
  548.       timeToLiveInMinutes: "${CACHE_SPECS_OTA_PACKAGES_DATA_TTL:60}" # Ota packages data cache TTL
  549.       maxSize: "${CACHE_SPECS_OTA_PACKAGES_DATA_MAX_SIZE:10}" # 0 means the cache is disabled
  550.     edges:
  551.       timeToLiveInMinutes: "${CACHE_SPECS_EDGES_TTL:1440}" # Edges cache TTL
  552.       maxSize: "${CACHE_SPECS_EDGES_MAX_SIZE:10000}" # 0 means the cache is disabled
  553.     repositorySettings:
  554.       timeToLiveInMinutes: "${CACHE_SPECS_REPOSITORY_SETTINGS_TTL:1440}" # Repository settings cache TTL
  555.       maxSize: "${CACHE_SPECS_REPOSITORY_SETTINGS_MAX_SIZE:10000}" # 0 means the cache is disabled
  556.     autoCommitSettings:
  557.       timeToLiveInMinutes: "${CACHE_SPECS_AUTO_COMMIT_SETTINGS_TTL:1440}" # Autocommit settings cache TTL
  558.       maxSize: "${CACHE_SPECS_AUTO_COMMIT_SETTINGS_MAX_SIZE:10000}" # 0 means the cache is disabled
  559.     twoFaVerificationCodes:
  560.       timeToLiveInMinutes: "${CACHE_SPECS_TWO_FA_VERIFICATION_CODES_TTL:60}" # Two factor verification codes cache TTL
  561.       maxSize: "${CACHE_SPECS_TWO_FA_VERIFICATION_CODES_MAX_SIZE:100000}" # 0 means the cache is disabled
  562.     versionControlTask:
  563.       timeToLiveInMinutes: "${CACHE_SPECS_VERSION_CONTROL_TASK_TTL:20}" # Version control task cache TTL
  564.       maxSize: "${CACHE_SPECS_VERSION_CONTROL_TASK_MAX_SIZE:100000}" # 0 means the cache is disabled
  565.     userSettings:
  566.       timeToLiveInMinutes: "${CACHE_SPECS_USER_SETTINGS_TTL:1440}" # User settings cache TTL
  567.       maxSize: "${CACHE_SPECS_USER_SETTINGS_MAX_SIZE:100000}" # 0 means the cache is disabled
  568.     dashboardTitles:
  569.       timeToLiveInMinutes: "${CACHE_SPECS_DASHBOARD_TITLES_TTL:1440}" # Dashboard titles cache TTL
  570.       maxSize: "${CACHE_SPECS_DASHBOARD_TITLES_MAX_SIZE:100000}" # 0 means the cache is disabled
  571.     entityCount:
  572.       timeToLiveInMinutes: "${CACHE_SPECS_ENTITY_COUNT_TTL:1440}" # Entity count cache TTL
  573.       maxSize: "${CACHE_SPECS_ENTITY_COUNT_MAX_SIZE:100000}" # 0 means the cache is disabled
  574.     resourceInfo:
  575.       timeToLiveInMinutes: "${CACHE_SPECS_RESOURCE_INFO_TTL:1440}" # Resource info cache TTL
  576.       maxSize: "${CACHE_SPECS_RESOURCE_INFO_MAX_SIZE:100000}" # 0 means the cache is disabled
  577.     alarmTypes:
  578.       timeToLiveInMinutes: "${CACHE_SPECS_ALARM_TYPES_TTL:60}" # Alarm types cache TTL
  579.       maxSize: "${CACHE_SPECS_ALARM_TYPES_MAX_SIZE:10000}" # 0 means the cache is disabled
  580.  
  581.   # Deliberately placed outside the 'specs' group above
  582.   notificationRules:
  583.     timeToLiveInMinutes: "${CACHE_SPECS_NOTIFICATION_RULES_TTL:30}" # Notification rules cache TTL
  584.     maxSize: "${CACHE_SPECS_NOTIFICATION_RULES_MAX_SIZE:1000}" # 0 means the cache is disabled
  585.   rateLimits:
  586.     timeToLiveInMinutes: "${CACHE_SPECS_RATE_LIMITS_TTL:120}" # Rate limits cache TTL
  587.     maxSize: "${CACHE_SPECS_RATE_LIMITS_MAX_SIZE:200000}" # 0 means the cache is disabled
  588.   entityLimits:
  589.     timeToLiveInMinutes: "${CACHE_SPECS_ENTITY_LIMITS_TTL:5}" # Entity limits cache TTL
  590.     maxSize: "${CACHE_SPECS_ENTITY_LIMITS_MAX_SIZE:100000}" # 0 means the cache is disabled
  591.   image:
  592.     etag:
  593.       timeToLiveInMinutes: "${CACHE_SPECS_IMAGE_ETAGS_TTL:44640}" # Image ETags cache TTL
  594.       maxSize: "${CACHE_SPECS_IMAGE_ETAGS_MAX_SIZE:10000}" # 0 means the cache is disabled
  595.     systemImagesBrowserTtlInMinutes: "${CACHE_SPECS_IMAGE_SYSTEM_BROWSER_TTL:0}" # Browser cache TTL for system images in minutes. 0 means the cache is disabled
  596.     tenantImagesBrowserTtlInMinutes: "${CACHE_SPECS_IMAGE_TENANT_BROWSER_TTL:0}" # Browser cache TTL for tenant images in minutes. 0 means the cache is disabled
  597.  
  598. # Spring data parameters
  599. spring.data.redis.repositories.enabled: false # Disable this because it is not required.
  600.  
  601. # Redis configuration parameters
  602. redis:
  603.  # standalone or cluster or sentinel
  604.   connection:
  605.    # Redis deployment type: Standalone (single Redis node deployment) OR Cluster
  606.     type: "${REDIS_CONNECTION_TYPE:standalone}"
  607.   standalone:
  608.    # Redis connection host
  609.     host: "${REDIS_HOST:localhost}"
  610.     # Redis connection port
  611.     port: "${REDIS_PORT:6379}"
  612.     # Use the default Redis configuration file
  613.     useDefaultClientConfig: "${REDIS_USE_DEFAULT_CLIENT_CONFIG:true}"
  614.     # This value may be used only if you used not default ClientConfig
  615.     clientName: "${REDIS_CLIENT_NAME:standalone}"
  616.     # This value may be used only if you used not default ClientConfig
  617.     connectTimeout: "${REDIS_CLIENT_CONNECT_TIMEOUT:30000}"
  618.     # This value may be used only if you used not default ClientConfig
  619.     readTimeout: "${REDIS_CLIENT_READ_TIMEOUT:60000}"
  620.     # This value may be used only if you used not default ClientConfig
  621.     usePoolConfig: "${REDIS_CLIENT_USE_POOL_CONFIG:false}"
  622.   cluster:
  623.    # Comma-separated list of "host:port" pairs to bootstrap from.
  624.     nodes: "${REDIS_NODES:}"
  625.     # Maximum number of redirects to follow when executing commands across the cluster.
  626.     max-redirects: "${REDIS_MAX_REDIRECTS:12}"
  627.     # if set false will be used pool config build from values of the pool config section
  628.     useDefaultPoolConfig: "${REDIS_USE_DEFAULT_POOL_CONFIG:true}"
  629.   sentinel:
  630.    # name of the master node
  631.     master: "${REDIS_MASTER:}"
  632.     # comma-separated list of "host:port" pairs of sentinels
  633.     sentinels: "${REDIS_SENTINELS:}"
  634.     # password to authenticate with sentinel
  635.     password: "${REDIS_SENTINEL_PASSWORD:}"
  636.     # if set false will be used pool config build from values of the pool config section
  637.     useDefaultPoolConfig: "${REDIS_USE_DEFAULT_POOL_CONFIG:true}"
  638.   # db index
  639.   db: "${REDIS_DB:0}"
  640.   # db password
  641.   password: "${REDIS_PASSWORD:}"
  642.   # pool config
  643.   pool_config:
  644.    # Maximum number of connections that can be allocated by the connection pool
  645.     maxTotal: "${REDIS_POOL_CONFIG_MAX_TOTAL:128}"
  646.     # Maximum number of idle connections that can be maintained in the pool without being closed
  647.     maxIdle: "${REDIS_POOL_CONFIG_MAX_IDLE:128}"
  648.     # Minumum number of idle connections that can be maintained in the pool without being closed
  649.     minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
  650.     # Enable/Disable PING command sent when a connection is borrowed
  651.     testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
  652.     # The property is used to specify whether to test the connection before returning it to the connection pool.
  653.     testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
  654.     # The property is used in the context of connection pooling in Redis
  655.     testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
  656.     # Minimum time that an idle connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds
  657.     minEvictableMs: "${REDIS_POOL_CONFIG_MIN_EVICTABLE_MS:60000}"
  658.     # Specifies the time interval in milliseconds between two consecutive eviction runs
  659.     evictionRunsMs: "${REDIS_POOL_CONFIG_EVICTION_RUNS_MS:30000}"
  660.     # Maximum time in milliseconds where a client is willing to wait for a connection from the pool when all connections are exhausted
  661.     maxWaitMills: "${REDIS_POOL_CONFIG_MAX_WAIT_MS:60000}"
  662.     # Specifies the number of connections to test for eviction during each eviction run
  663.     numberTestsPerEvictionRun: "${REDIS_POOL_CONFIG_NUMBER_TESTS_PER_EVICTION_RUN:3}"
  664.     # Determines the behavior when a thread requests a connection from the pool, but there are no available connections, and the pool cannot create more due to the maxTotal configuration
  665.     blockWhenExhausted: "${REDIS_POOL_CONFIG_BLOCK_WHEN_EXHAUSTED:true}"
  666.   # TTL for short-living SET commands that are used to replace DEL to enable transaction support
  667.   evictTtlInMs: "${REDIS_EVICT_TTL_MS:60000}"
  668.  
  669.  
  670. # Update version parameters
  671. updates:
  672.  # Enable/disable checks for the new version
  673.   enabled: "${UPDATES_ENABLED:true}"
  674.  
  675. # Spring CORS configuration parameters
  676. spring.mvc.cors:
  677.   mappings:
  678.    # Intercept path
  679.     "[/api/**]":
  680.      #Comma-separated list of origins to allow. '*' allows all origins. When not set, CORS support is disabled.
  681.       allowed-origin-patterns: "*"
  682.       #Comma-separated list of methods to allow. '*' allows all methods.
  683.       allowed-methods: "*"
  684.       #Comma-separated list of headers to allow in a request. '*' allows all headers.
  685.       allowed-headers: "*"
  686.       #How long, in seconds, the response from a pre-flight request can be cached by clients.
  687.       max-age: "1800"
  688.       #Set whether credentials are supported. When not set, credentials are not supported.
  689.       allow-credentials: "true"
  690.  
  691. # General spring parameters
  692. spring.main.allow-circular-references: "true" # Spring Boot configuration property that controls whether circular dependencies between beans are allowed.
  693. spring.freemarker.checkTemplateLocation: "false" # spring freemarker configuration
  694. spring.mvc.async.request-timeout: "${SPRING_MVC_ASYNC_REQUEST_TIMEOUT:30000}" # The default timeout for asynchronous requests in milliseconds
  695. spring.mvc.pathmatch.matching-strategy: "ANT_PATH_MATCHER" # For endpoints matching in Swagger
  696. spring.resources.chain:
  697.   compressed: "true" # This property enables or disables support for serving pre-compressed resources (for example, a .gzip or .br file)
  698.   strategy:
  699.     content:
  700.       enabled: "true" # This property enables or disables the content Version Strategy. This strategy allows Spring to generate a unique version for static resources, which is based on the content of the resource
  701.  
  702. spring.servlet.multipart.max-file-size: "${SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE:50MB}" # Total file size cannot exceed 50MB when configuring file uploads
  703. spring.servlet.multipart.max-request-size: "${SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE:50MB}" # Total request size for a multipart/form-data cannot exceed 50MB
  704.  
  705. spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation: "true" #Fix Postgres JPA Error (Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented)
  706. spring.jpa.properties.hibernate.order_by.default_null_ordering: "${SPRING_JPA_PROPERTIES_HIBERNATE_ORDER_BY_DEFAULT_NULL_ORDERING:last}" # Note: as for current Spring JPA version, custom NullHandling for the Sort.Order is ignored and this parameter is used
  707. spring.jpa.properties.hibernate.dialect: "${SPRING_JPA_DIALECT:org.thingsboard.server.dao.ThingsboardPostgreSQLDialect}" # we use custom dialect that contains ilike(arg1, arg2) function (is interpreted to postgres ILIKE operator)
  708.  
  709. # SQL DAO Configuration parameters
  710. spring:
  711.   data:
  712.     jpa:
  713.       repositories:
  714.         enabled: "true" # Enable/Disable the Spring Data JPA repositories support
  715.   jpa:
  716.     properties:
  717.       javax.persistence.query.timeout: "${JAVAX_PERSISTENCE_QUERY_TIMEOUT:30000}" # General timeout for JDBC queries
  718.     open-in-view: "false" # Enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
  719.     hibernate:
  720.      # You can set a Hibernate feature that controls the DDL behavior in a more fine-grained way. The standard Hibernate property values are none, validate, update, create-drop. Spring Boot chooses a default value for you based on whether it thinks your database is embedded (default create-drop) or not (default none)
  721.       ddl-auto: "none"
  722.   datasource:
  723.    # Database driver for Spring JPA - org.postgresql.Driver
  724.     driverClassName: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
  725.     # Database connection URL
  726.     url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/thingsboard}"
  727.     # Database user name
  728.     username: "${SPRING_DATASOURCE_USERNAME:postgres}"
  729.     # Database user password
  730.     password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
  731.     hikari:
  732.      # This property controls the amount of time that a connection can be out of the pool before a message is logged indicating a possible connection leak. A value of 0 means leak detection is disabled
  733.       leakDetectionThreshold: "${SPRING_DATASOURCE_HIKARI_LEAK_DETECTION_THRESHOLD:0}"
  734.       # This property increases the number of connections in the pool as demand increases. At the same time, the property ensures that the pool doesn't grow to the point of exhausting a system's resources, which ultimately affects an application's performance and availability
  735.       maximumPoolSize: "${SPRING_DATASOURCE_MAXIMUM_POOL_SIZE:16}"
  736.       registerMbeans: "${SPRING_DATASOURCE_HIKARI_REGISTER_MBEANS:false}" # true - enable MBean to diagnose pools state via JMX
  737.  
  738. # Audit log parameters
  739. audit-log:
  740.  # Enable/disable audit log functionality.
  741.   enabled: "${AUDIT_LOG_ENABLED:true}"
  742.   # Logging levels per each entity type.
  743.   # Allowed values: OFF (disable), W (log write operations), RW (log read and write operations)
  744.   logging-level:
  745.     mask:
  746.       "device": "${AUDIT_LOG_MASK_DEVICE:W}" # Device logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  747.       "asset": "${AUDIT_LOG_MASK_ASSET:W}" # Asset logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  748.       "dashboard": "${AUDIT_LOG_MASK_DASHBOARD:W}" # Dashboard logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  749.       "widget_type": "${AUDIT_LOG_MASK_WIDGET_TYPE:W}" # Widget type logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  750.       "widgets_bundle": "${AUDIT_LOG_MASK_WIDGETS_BUNDLE:W}" # Widget bundles logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  751.       "customer": "${AUDIT_LOG_MASK_CUSTOMER:W}" # Customer logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  752.       "user": "${AUDIT_LOG_MASK_USER:W}" # User logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  753.       "rule_chain": "${AUDIT_LOG_MASK_RULE_CHAIN:W}" # Rule chain logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  754.       "alarm": "${AUDIT_LOG_MASK_ALARM:W}" # Alarm logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  755.       "entity_view": "${AUDIT_LOG_MASK_ENTITY_VIEW:W}" # Entity view logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  756.       "device_profile": "${AUDIT_LOG_MASK_DEVICE_PROFILE:W}" # Device profile logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  757.       "asset_profile": "${AUDIT_LOG_MASK_ASSET_PROFILE:W}" # Asset profile logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  758.       "edge": "${AUDIT_LOG_MASK_EDGE:W}" # Edge logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  759.       "tb_resource": "${AUDIT_LOG_MASK_RESOURCE:W}" # TB resource logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  760.       "ota_package": "${AUDIT_LOG_MASK_OTA_PACKAGE:W}" # Ota package logging levels. Allowed values: OFF (disable), W (log write operations), RW (log read and write operation
  761.   sink:
  762.    # Type of external sink. possible options: none, elasticsearch
  763.     type: "${AUDIT_LOG_SINK_TYPE:none}"
  764.     # Name of the index where audit logs are stored
  765.     # Index name could contain next placeholders (not mandatory):
  766.     # @{TENANT} - substituted by tenant ID
  767.     # @{DATE} - substituted by current date in format provided in audit_log.sink.date_format
  768.     index_pattern: "${AUDIT_LOG_SINK_INDEX_PATTERN:@{TENANT}_AUDIT_LOG_@{DATE}}"
  769.     # Date format. Details of the pattern can be found here:
  770.     # https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
  771.     date_format: "${AUDIT_LOG_SINK_DATE_FORMAT:YYYY.MM.dd}"
  772.     scheme_name: "${AUDIT_LOG_SINK_SCHEME_NAME:http}" # http or https
  773.     host: "${AUDIT_LOG_SINK_HOST:localhost}" # Host of external sink system
  774.     port: "${AUDIT_LOG_SINK_PORT:9200}" # Port of external sink system
  775.     user_name: "${AUDIT_LOG_SINK_USER_NAME:}" # Username used to access external sink system
  776.     password: "${AUDIT_LOG_SINK_PASSWORD:}" # Password used to access external sink system
  777.  
  778. # Device state parameters
  779. state:
  780.  # Should be greater than transport.sessions.report_timeout
  781.   defaultInactivityTimeoutInSec: "${DEFAULT_INACTIVITY_TIMEOUT:600}"
  782.   defaultStateCheckIntervalInSec: "${DEFAULT_STATE_CHECK_INTERVAL:60}" # Interval for checking the device state after a specified period. Time in seconds
  783.   # Controls whether we store the device 'active' flag in attributes (default) or telemetry.
  784.   # If you device to change this parameter, you should re-create the device info view as one of the following:
  785.   # If 'persistToTelemetry' is changed from 'false' to 'true': 'CREATE OR REPLACE VIEW device_info_view AS SELECT * FROM device_info_active_ts_view;'
  786.   # If 'persistToTelemetry' is changed from 'true' to 'false': 'CREATE OR REPLACE VIEW device_info_view AS SELECT * FROM device_info_active_attribute_view;'
  787.   persistToTelemetry: "${PERSIST_STATE_TO_TELEMETRY:false}"
  788.  
  789. # Tbel parameters
  790. tbel:
  791.  # Enable/Disable TBEL feature.
  792.   enabled: "${TBEL_ENABLED:true}"
  793.   # Limit the number of arguments that are passed to the function to execute the script
  794.   max_total_args_size: "${TBEL_MAX_TOTAL_ARGS_SIZE:100000}"
  795.   # Maximum allowed symbols in a result after processing a script
  796.   max_result_size: "${TBEL_MAX_RESULT_SIZE:300000}"
  797.   # Maximum allowed symbols in the script body
  798.   max_script_body_size: "${TBEL_MAX_SCRIPT_BODY_SIZE:50000}"
  799.   # Maximum allowed TBEL script execution memory
  800.   max_memory_limit_mb: "${TBEL_MAX_MEMORY_LIMIT_MB: 8}"
  801.   # Maximum allowed TBEL script execution errors before it will be blacklisted
  802.   max_errors: "${TBEL_MAX_ERRORS:3}"
  803.   # TBEL Eval max request timeout in milliseconds. 0 - no timeout
  804.   max_requests_timeout: "${TBEL_MAX_REQUEST_TIMEOUT:500}"
  805.   # Maximum time in seconds for black listed function to stay in the list.
  806.   max_black_list_duration_sec: "${TBEL_MAX_BLACKLIST_DURATION_SEC:60}"
  807.   # Specify thread pool size for javascript executor service
  808.   thread_pool_size: "${TBEL_THREAD_POOL_SIZE:50}"
  809.   # Maximum cache size of TBEL compiled scripts
  810.   compiled_scripts_cache_size: "${TBEL_COMPILED_SCRIPTS_CACHE_SIZE:1000}"
  811.   stats:
  812.    # Enable/Disable stats collection for TBEL engine
  813.     enabled: "${TB_TBEL_STATS_ENABLED:false}"
  814.     # Interval of logging for TBEL stats
  815.     print_interval_ms: "${TB_TBEL_STATS_PRINT_INTERVAL_MS:10000}"
  816.  
  817. # JS parameters
  818. js:
  819.  # local (Nashorn Engine, deprecated) OR remote JS-Executors (NodeJS)
  820.   evaluator: "${JS_EVALUATOR:local}"
  821.   # Limit the number of arguments that are passed to the function to execute the script
  822.   max_total_args_size: "${JS_MAX_TOTAL_ARGS_SIZE:100000}"
  823.   # Maximum allowed symbols in a result after processing a script
  824.   max_result_size: "${JS_MAX_RESULT_SIZE:300000}"
  825.   # Maximum allowed symbols in script body
  826.   max_script_body_size: "${JS_MAX_SCRIPT_BODY_SIZE:50000}"
  827.   # Built-in JVM JavaScript environment properties
  828.   local:
  829.    # Specify thread pool size for javascript executor service
  830.     js_thread_pool_size: "${LOCAL_JS_THREAD_POOL_SIZE:50}"
  831.     # Use Sandboxed (secured) JVM JavaScript environment
  832.     use_js_sandbox: "${USE_LOCAL_JS_SANDBOX:true}"
  833.     # Specify thread pool size for JavaScript sandbox resource monitor
  834.     monitor_thread_pool_size: "${LOCAL_JS_SANDBOX_MONITOR_THREAD_POOL_SIZE:4}"
  835.     # Maximum CPU time in milliseconds allowed for script execution
  836.     max_cpu_time: "${LOCAL_JS_SANDBOX_MAX_CPU_TIME:8000}"
  837.     # Maximum allowed JavaScript execution errors before JavaScript will be blacklisted
  838.     max_errors: "${LOCAL_JS_SANDBOX_MAX_ERRORS:3}"
  839.     # JS Eval max request timeout. 0 - no timeout
  840.     max_requests_timeout: "${LOCAL_JS_MAX_REQUEST_TIMEOUT:0}"
  841.     # Maximum time in seconds for black listed function to stay in the list.
  842.     max_black_list_duration_sec: "${LOCAL_JS_SANDBOX_MAX_BLACKLIST_DURATION_SEC:60}"
  843.     stats:
  844.      # Enable/Disable stats collection for local JS executor
  845.       enabled: "${TB_JS_LOCAL_STATS_ENABLED:false}"
  846.       # Interval of logging for local JS executor stats
  847.       print_interval_ms: "${TB_JS_LOCAL_STATS_PRINT_INTERVAL_MS:10000}"
  848.   # Remote JavaScript environment properties
  849.   remote:
  850.    # Specify thread pool size for javascript executor service
  851.     js_thread_pool_size: "${REMOTE_JS_THREAD_POOL_SIZE:50}"
  852.     # Maximum allowed JavaScript execution errors before JavaScript will be blacklisted
  853.     max_errors: "${REMOTE_JS_SANDBOX_MAX_ERRORS:3}"
  854.     # Maximum time in seconds for black listed function to stay in the list.
  855.     max_black_list_duration_sec: "${REMOTE_JS_SANDBOX_MAX_BLACKLIST_DURATION_SEC:60}"
  856.     stats:
  857.      # Enable/Disable stats collection for remote JS executor
  858.       enabled: "${TB_JS_REMOTE_STATS_ENABLED:false}"
  859.       # Interval of logging for remote JS executor stats
  860.       print_interval_ms: "${TB_JS_REMOTE_STATS_PRINT_INTERVAL_MS:10000}"
  861.  
  862. # Transport configuration parameters
  863. transport:
  864.   sessions:
  865.    # Inactivity timeout for device session in transport service. The last activity time of the device session is updated if the device sends any message, including keepalive messages
  866.     inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:300000}"
  867.     # Interval of periodic check for expired sessions and report of the changes to session last activity time
  868.     report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:3000}"
  869.   json:
  870.    # Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON
  871.     type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"
  872.     # Maximum allowed string value length when processing Telemetry/Attributes JSON (0 value disables string value length check)
  873.     max_string_value_length: "${JSON_MAX_STRING_VALUE_LENGTH:0}"
  874.   client_side_rpc:
  875.    # Processing timeout interval of the RPC command on the CLIENT SIDE. Time in milliseconds
  876.     timeout: "${CLIENT_SIDE_RPC_TIMEOUT:60000}"
  877.   # Enable/disable http/mqtt/coap transport protocols (has higher priority than certain protocol's 'enabled' property)
  878.   api_enabled: "${TB_TRANSPORT_API_ENABLED:true}"
  879.   log:
  880.    # Enable/Disable log of transport messages to telemetry. For example, logging of LwM2M registration update
  881.     enabled: "${TB_TRANSPORT_LOG_ENABLED:true}"
  882.     # Maximum length of the log message. The content will be truncated to the specified value if needed
  883.     max_length: "${TB_TRANSPORT_LOG_MAX_LENGTH:1024}"
  884.   rate_limits:
  885.    # Enable or disable generic rate limits. Device and Tenant-specific rate limits are controlled in Tenant Profile.
  886.     ip_limits_enabled: "${TB_TRANSPORT_IP_RATE_LIMITS_ENABLED:false}"
  887.     # Maximum number of connect attempts with invalid credentials
  888.     max_wrong_credentials_per_ip: "${TB_TRANSPORT_MAX_WRONG_CREDENTIALS_PER_IP:10}"
  889.     # Timeout (in milliseconds) to expire block IP addresses
  890.     ip_block_timeout: "${TB_TRANSPORT_IP_BLOCK_TIMEOUT:60000}"
  891.   # Local HTTP transport parameters
  892.   http:
  893.    # Enable/Disable local HTTP transport protocol
  894.     enabled: "${HTTP_ENABLED:true}"
  895.     # HTTP request processing timeout in milliseconds
  896.     request_timeout: "${HTTP_REQUEST_TIMEOUT:60000}"
  897.     # HTTP maximum request processing timeout in milliseconds
  898.     max_request_timeout: "${HTTP_MAX_REQUEST_TIMEOUT:300000}"
  899.   # Local MQTT transport parameters
  900.   mqtt:
  901.    # Enable/disable mqtt transport protocol.
  902.     enabled: "${MQTT_ENABLED:true}"
  903.     # MQTT bind-address
  904.     bind_address: "${MQTT_BIND_ADDRESS:0.0.0.0}"
  905.     # MQTT bind port
  906.     bind_port: "${MQTT_BIND_PORT:1883}"
  907.     # Enable proxy protocol support. Disabled by default. If enabled, supports both v1 and v2.
  908.     # Useful to get the real IP address of the client in the logs and for rate limits.
  909.     proxy_enabled: "${MQTT_PROXY_PROTOCOL_ENABLED:false}"
  910.     # MQTT processing timeout in milliseconds
  911.     timeout: "${MQTT_TIMEOUT:10000}"
  912.     msg_queue_size_per_device_limit: "${MQTT_MSG_QUEUE_SIZE_PER_DEVICE_LIMIT:100}" # messages await in the queue before the device connected state. This limit works on the low level before TenantProfileLimits mechanism
  913.     netty:
  914.      # Netty leak detector level
  915.       leak_detector_level: "${NETTY_LEAK_DETECTOR_LVL:DISABLED}"
  916.       # Netty BOSS threads count
  917.       boss_group_thread_count: "${NETTY_BOSS_GROUP_THREADS:1}"
  918.       # Netty worker threads count
  919.       worker_group_thread_count: "${NETTY_WORKER_GROUP_THREADS:12}"
  920.       # Max payload size in bytes
  921.       max_payload_size: "${NETTY_MAX_PAYLOAD_SIZE:65536}"
  922.       # Enables TCP keepalive. This means that TCP starts sending keepalive probes when a connection is idle for some time
  923.       so_keep_alive: "${NETTY_SO_KEEPALIVE:false}"
  924.     # MQTT SSL configuration
  925.     ssl:
  926.      # Enable/disable SSL support
  927.       enabled: "${MQTT_SSL_ENABLED:false}"
  928.       # MQTT SSL bind-address
  929.       bind_address: "${MQTT_SSL_BIND_ADDRESS:0.0.0.0}"
  930.       # MQTT SSL bind port
  931.       bind_port: "${MQTT_SSL_BIND_PORT:8883}"
  932.       # SSL protocol: See https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#sslcontext-algorithms
  933.       protocol: "${MQTT_SSL_PROTOCOL:TLSv1.2}"
  934.       # Server SSL credentials
  935.       credentials:
  936.        # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
  937.         type: "${MQTT_SSL_CREDENTIALS_TYPE:PEM}"
  938.         # PEM server credentials
  939.         pem:
  940.          # Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
  941.           cert_file: "${MQTT_SSL_PEM_CERT:mqttserver.pem}"
  942.           # Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file;
  943.           key_file: "${MQTT_SSL_PEM_KEY:mqttserver_key.pem}"
  944.           # Server certificate private key password (optional)
  945.           key_password: "${MQTT_SSL_PEM_KEY_PASSWORD:server_key_password}"
  946.         # Keystore server credentials
  947.         keystore:
  948.          # Type of the key store (JKS or PKCS12)
  949.           type: "${MQTT_SSL_KEY_STORE_TYPE:JKS}"
  950.           # Path to the key store that holds the SSL certificate
  951.           store_file: "${MQTT_SSL_KEY_STORE:mqttserver.jks}"
  952.           # Password used to access the key store
  953.           store_password: "${MQTT_SSL_KEY_STORE_PASSWORD:server_ks_password}"
  954.           # Optional alias of the private key. If not set, the platform will load the first private key from the keystore
  955.           key_alias: "${MQTT_SSL_KEY_ALIAS:}"
  956.           # Optional password to access the private key. If not set, the platform will attempt to load the private keys that are not protected with the password;
  957.           key_password: "${MQTT_SSL_KEY_PASSWORD:server_key_password}"
  958.       # Skip certificate validity check for client certificates.
  959.       skip_validity_check_for_client_cert: "${MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT:false}"
  960.   # Local CoAP transport parameters
  961.   coap:
  962.    # Enable/disable CoAP transport protocol.
  963.     enabled: "${COAP_ENABLED:true}"
  964.     # CoAP bind-address
  965.     bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
  966.     # CoAP bind port
  967.     bind_port: "${COAP_BIND_PORT:5683}"
  968.     # CoaP processing timeout in milliseconds
  969.     timeout: "${COAP_TIMEOUT:10000}"
  970.     # CoaP piggyback response timeout in milliseconds
  971.     piggyback_timeout: "${COAP_PIGGYBACK_TIMEOUT:500}"
  972.     # Default PSM Activity Timer if not specified in device profile
  973.     psm_activity_timer: "${COAP_PSM_ACTIVITY_TIMER:10000}"
  974.     # Default PSM Activity Timer if not specified in device profile
  975.     paging_transmission_window: "${COAP_PAGING_TRANSMISSION_WINDOW:10000}"
  976.     dtls:
  977.      # Enable/disable DTLS 1.2 support
  978.       enabled: "${COAP_DTLS_ENABLED:false}"
  979.       # RFC7925_RETRANSMISSION_TIMEOUT_IN_MILLISECONDS = 9000
  980.       retransmission_timeout: "${COAP_DTLS_RETRANSMISSION_TIMEOUT_MS:9000}"
  981.       # CoAP DTLS bind-address
  982.       bind_address: "${COAP_DTLS_BIND_ADDRESS:0.0.0.0}"
  983.       # CoAP DTLS bind port
  984.       bind_port: "${COAP_DTLS_BIND_PORT:5684}"
  985.       # Server DTLS credentials
  986.       credentials:
  987.        # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
  988.         type: "${COAP_DTLS_CREDENTIALS_TYPE:PEM}"
  989.         # PEM server credentials
  990.         pem:
  991.          # Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
  992.           cert_file: "${COAP_DTLS_PEM_CERT:coapserver.pem}"
  993.           # Path to the server certificate private key file. Optional by default. Required if the private key is not present in the server certificate file;
  994.           key_file: "${COAP_DTLS_PEM_KEY:coapserver_key.pem}"
  995.           # Server certificate private key password (optional)
  996.           key_password: "${COAP_DTLS_PEM_KEY_PASSWORD:server_key_password}"
  997.         # Keystore server credentials
  998.         keystore:
  999.          # Type of the key store (JKS or PKCS12)
  1000.           type: "${COAP_DTLS_KEY_STORE_TYPE:JKS}"
  1001.           # Path to the key store that holds the SSL certificate
  1002.           store_file: "${COAP_DTLS_KEY_STORE:coapserver.jks}"
  1003.           # Password used to access the key store
  1004.           store_password: "${COAP_DTLS_KEY_STORE_PASSWORD:server_ks_password}"
  1005.           # Key alias
  1006.           key_alias: "${COAP_DTLS_KEY_ALIAS:serveralias}"
  1007.           # Password used to access the key
  1008.           key_password: "${COAP_DTLS_KEY_PASSWORD:server_key_password}"
  1009.       x509:
  1010.        # Skip certificate validity check for client certificates.
  1011.         skip_validity_check_for_client_cert: "${TB_COAP_X509_DTLS_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT:false}"
  1012.         # Inactivity timeout of DTLS session. Used to clean cache
  1013.         dtls_session_inactivity_timeout: "${TB_COAP_X509_DTLS_SESSION_INACTIVITY_TIMEOUT:86400000}"
  1014.         # Interval of periodic eviction of the timed-out DTLS sessions
  1015.         dtls_session_report_timeout: "${TB_COAP_X509_DTLS_SESSION_REPORT_TIMEOUT:1800000}"
  1016.   # Local LwM2M transport parameters
  1017.   lwm2m:
  1018.    # Enable/disable LwM2M transport protocol.
  1019.     enabled: "${LWM2M_ENABLED:true}"
  1020.     dtls:
  1021.      # RFC7925_RETRANSMISSION_TIMEOUT_IN_MILLISECONDS = 9000
  1022.       retransmission_timeout: "${LWM2M_DTLS_RETRANSMISSION_TIMEOUT_MS:9000}"
  1023.     server:
  1024.      # LwM2M Server ID
  1025.       id: "${LWM2M_SERVER_ID:123}"
  1026.       # LwM2M server bind address. Bind to all interfaces by default
  1027.       bind_address: "${LWM2M_BIND_ADDRESS:0.0.0.0}"
  1028.       # LwM2M server bind port
  1029.       bind_port: "${LWM2M_BIND_PORT:5685}"
  1030.       security:
  1031.        # LwM2M server bind address for DTLS. Bind to all interfaces by default
  1032.         bind_address: "${LWM2M_SECURITY_BIND_ADDRESS:0.0.0.0}"
  1033.         # LwM2M server bind port for DTLS
  1034.         bind_port: "${LWM2M_SECURITY_BIND_PORT:5686}"
  1035.         # Server X509 Certificates support
  1036.         credentials:
  1037.          # Whether to enable LWM2M server X509 Certificate/RPK support
  1038.           enabled: "${LWM2M_SERVER_CREDENTIALS_ENABLED:false}"
  1039.           # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
  1040.           type: "${LWM2M_SERVER_CREDENTIALS_TYPE:PEM}"
  1041.           # PEM server credentials
  1042.           pem:
  1043.            # Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
  1044.             cert_file: "${LWM2M_SERVER_PEM_CERT:lwm2mserver.pem}"
  1045.             # Path to the server certificate private key file. Optional by default. Required if the private key is not present in the server certificate file;
  1046.             key_file: "${LWM2M_SERVER_PEM_KEY:lwm2mserver_key.pem}"
  1047.             # Server certificate private key password (optional)
  1048.             key_password: "${LWM2M_SERVER_PEM_KEY_PASSWORD:server_key_password}"
  1049.           # Keystore server credentials
  1050.           keystore:
  1051.            # Type of the key store (JKS or PKCS12)
  1052.             type: "${LWM2M_SERVER_KEY_STORE_TYPE:JKS}"
  1053.             # Path to the key store that holds the SSL certificate
  1054.             store_file: "${LWM2M_SERVER_KEY_STORE:lwm2mserver.jks}"
  1055.             # Password used to access the key store
  1056.             store_password: "${LWM2M_SERVER_KEY_STORE_PASSWORD:server_ks_password}"
  1057.             # Key alias
  1058.             key_alias: "${LWM2M_SERVER_KEY_ALIAS:server}"
  1059.             # Password used to access the key
  1060.             key_password: "${LWM2M_SERVER_KEY_PASSWORD:server_ks_password}"
  1061.         # Only Certificate_x509:
  1062.         skip_validity_check_for_client_cert: "${TB_LWM2M_SERVER_SECURITY_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT:false}"
  1063.     bootstrap:
  1064.      # Enable/disable Bootstrap Server
  1065.       enabled: "${LWM2M_ENABLED_BS:true}"
  1066.       # Default value in LwM2M client after start in mode Bootstrap for the object : name "LWM2M Security" field: "Short Server ID" (deviceProfile: Bootstrap.BOOTSTRAP SERVER.Short ID)
  1067.       id: "${LWM2M_SERVER_ID_BS:111}"
  1068.       # LwM2M bootstrap server bind address. Bind to all interfaces by default
  1069.       bind_address: "${LWM2M_BS_BIND_ADDRESS:0.0.0.0}"
  1070.       # LwM2M bootstrap server bind port
  1071.       bind_port: "${LWM2M_BS_BIND_PORT:5687}"
  1072.       security:
  1073.        # LwM2M bootstrap server bind address for DTLS. Bind to all interfaces by default
  1074.         bind_address: "${LWM2M_BS_SECURITY_BIND_ADDRESS:0.0.0.0}"
  1075.         # LwM2M bootstrap server bind address for DTLS. Bind to all interfaces by default
  1076.         bind_port: "${LWM2M_BS_SECURITY_BIND_PORT:5688}"
  1077.         # Bootstrap server X509 Certificates support
  1078.         credentials:
  1079.          # Whether to enable LWM2M bootstrap server X509 Certificate/RPK support
  1080.           enabled: "${LWM2M_BS_CREDENTIALS_ENABLED:false}"
  1081.           # Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)
  1082.           type: "${LWM2M_BS_CREDENTIALS_TYPE:PEM}"
  1083.           # PEM server credentials
  1084.           pem:
  1085.            # Path to the server certificate file (holds server certificate or certificate chain, may include server private key)
  1086.             cert_file: "${LWM2M_BS_PEM_CERT:lwm2mserver.pem}"
  1087.             # Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file
  1088.             key_file: "${LWM2M_BS_PEM_KEY:lwm2mserver_key.pem}"
  1089.             # Server certificate private key password (optional)
  1090.             key_password: "${LWM2M_BS_PEM_KEY_PASSWORD:server_key_password}"
  1091.           # Keystore server credentials
  1092.           keystore:
  1093.            # Type of the key store (JKS or PKCS12)
  1094.             type: "${LWM2M_BS_KEY_STORE_TYPE:JKS}"
  1095.             # Path to the key store that holds the SSL certificate
  1096.             store_file: "${LWM2M_BS_KEY_STORE:lwm2mserver.jks}"
  1097.             # Password used to access the key store
  1098.             store_password: "${LWM2M_BS_KEY_STORE_PASSWORD:server_ks_password}"
  1099.             # Key alias
  1100.             key_alias: "${LWM2M_BS_KEY_ALIAS:bootstrap}"
  1101.             # Password used to access the key
  1102.             key_password: "${LWM2M_BS_KEY_PASSWORD:server_ks_password}"
  1103.     security:
  1104.      # X509 trust certificates
  1105.       trust-credentials:
  1106.        # Whether to load X509 trust certificates
  1107.         enabled: "${LWM2M_TRUST_CREDENTIALS_ENABLED:false}"
  1108.         # Trust certificates store type (PEM - pem certificates file; KEYSTORE - java keystore)
  1109.         type: "${LWM2M_TRUST_CREDENTIALS_TYPE:PEM}"
  1110.         # PEM certificates
  1111.         pem:
  1112.          # Path to the certificates file (holds trust certificates)
  1113.           cert_file: "${LWM2M_TRUST_PEM_CERT:lwm2mtruststorechain.pem}"
  1114.         # Keystore with trust certificates
  1115.         keystore:
  1116.          # Type of the key store (JKS or PKCS12)
  1117.           type: "${LWM2M_TRUST_KEY_STORE_TYPE:JKS}"
  1118.           # Path to the key store that holds the X509 certificates
  1119.           store_file: "${LWM2M_TRUST_KEY_STORE:lwm2mtruststorechain.jks}"
  1120.           # Password used to access the key store
  1121.           store_password: "${LWM2M_TRUST_KEY_STORE_PASSWORD:server_ks_password}"
  1122.       # Set usage of recommended cipher suites; true - allow only recommended cipher suites; false - allow not recommended cipher suites
  1123.       recommended_ciphers: "${LWM2M_RECOMMENDED_CIPHERS:false}"
  1124.       # Set usage of recommended supported groups (curves); true - allow only recommended supported groups, false - allow not recommended supported groups
  1125.       recommended_supported_groups: "${LWM2M_RECOMMENDED_SUPPORTED_GROUPS:true}"
  1126.     # Timeout of LwM2M operation
  1127.     timeout: "${LWM2M_TIMEOUT:120000}"
  1128.     # Thread pool size for processing of the LwM2M uplinks
  1129.     uplink_pool_size: "${LWM2M_UPLINK_POOL_SIZE:10}"
  1130.     # Thread pool size for processing of the LwM2M downlinks
  1131.     downlink_pool_size: "${LWM2M_DOWNLINK_POOL_SIZE:10}"
  1132.     # Thread pool size for processing of the OTA updates
  1133.     ota_pool_size: "${LWM2M_OTA_POOL_SIZE:10}"
  1134.     # Period of cleanup for the registrations in store
  1135.     clean_period_in_sec: "${LWM2M_CLEAN_PERIOD_IN_SEC:2}"
  1136.     # Maximum log size
  1137.     log_max_length: "${LWM2M_LOG_MAX_LENGTH:1024}"
  1138.     # PSM Activity Timer if not specified in the device profile
  1139.     psm_activity_timer: "${LWM2M_PSM_ACTIVITY_TIMER:10000}"
  1140.     # Paging Transmission Window for eDRX support if not specified in the device profile
  1141.     paging_transmission_window: "${LWM2M_PAGING_TRANSMISSION_WINDOW:10000}"
  1142.     network_config: # In this section you can specify custom parameters for LwM2M network configuration and expose the env variables to configure outside
  1143.   #      - key: "PROTOCOL_STAGE_THREAD_COUNT"
  1144.   #        value: "${LWM2M_PROTOCOL_STAGE_THREAD_COUNT:4}"
  1145.   snmp:
  1146.    # Enable/disable SNMP transport protocol
  1147.     enabled: "${SNMP_ENABLED:true}"
  1148.     # Snmp bind port
  1149.     bind_port: "${SNMP_BIND_PORT:1620}"
  1150.     response_processing:
  1151.      # parallelism level for executor (workStealingPool) that is responsible for handling responses from SNMP devices
  1152.       parallelism_level: "${SNMP_RESPONSE_PROCESSING_PARALLELISM_LEVEL:20}"
  1153.     # to configure SNMP to work over UDP or TCP
  1154.     underlying_protocol: "${SNMP_UNDERLYING_PROTOCOL:udp}"
  1155.     # Batch size to request OID mappings from the device (useful when the device profile has multiple hundreds of OID mappings)
  1156.     max_request_oids: "${SNMP_MAX_REQUEST_OIDS:100}"
  1157.     response:
  1158.      # To ignore SNMP response values that do not match the data type of the configured OID mapping (by default false - will throw an error if any value of the response not match configured data types)
  1159.       ignore_type_cast_errors: "${SNMP_RESPONSE_IGNORE_TYPE_CAST_ERRORS:false}"
  1160.   stats:
  1161.    # Enable/Disable the collection of transport statistics
  1162.     enabled: "${TB_TRANSPORT_STATS_ENABLED:true}"
  1163.     # Interval of transport statistics logging
  1164.     print-interval-ms: "${TB_TRANSPORT_STATS_PRINT_INTERVAL_MS:60000}"
  1165.  
  1166. # Device connectivity parameters
  1167. device:
  1168.   connectivity:
  1169.     http:
  1170.      # If true check-connectivity service will include curl command to the list of all test commands using DEVICE_CONNECTIVITY_HTTP_HOST and DEVICE_CONNECTIVITY_HTTP_PORT variables
  1171.       enabled: "${DEVICE_CONNECTIVITY_HTTP_ENABLED:true}"
  1172.       # Host of http transport service. If empty, the base URL will be used.
  1173.       host: "${DEVICE_CONNECTIVITY_HTTP_HOST:}"
  1174.       # Port of http transport service. If empty, default http port will be used.
  1175.       port: "${DEVICE_CONNECTIVITY_HTTP_PORT:8080}"
  1176.     https:
  1177.      # If true check-connectivity service will include curl command to the list of all test commands using DEVICE_CONNECTIVITY_HTTPS_HOST and DEVICE_CONNECTIVITY_HTTPS_PORT variables
  1178.       enabled: "${DEVICE_CONNECTIVITY_HTTPS_ENABLED:false}"
  1179.       # Host of http transport service. If empty, the base URL will be used.
  1180.       host: "${DEVICE_CONNECTIVITY_HTTPS_HOST:}"
  1181.       # Port of http transport service. If empty, the default https port will be used.
  1182.       port: "${DEVICE_CONNECTIVITY_HTTPS_PORT:443}"
  1183.     mqtt:
  1184.      # If true mosquito command will be included to the list of all test commands using DEVICE_CONNECTIVITY_MQTT_HOST and DEVICE_CONNECTIVITY_MQTT_PORT
  1185.       enabled: "${DEVICE_CONNECTIVITY_MQTT_ENABLED:true}"
  1186.       # Host of mqtt transport service. If empty, the base url host will be used.
  1187.       host: "${DEVICE_CONNECTIVITY_MQTT_HOST:}"
  1188.       # Port of mqtt transport service
  1189.       port: "${DEVICE_CONNECTIVITY_MQTT_PORT:1883}"
  1190.     mqtts:
  1191.      # If true mosquito command will be included in the list of all test commands using DEVICE_CONNECTIVITY_MQTTS_HOST and DEVICE_CONNECTIVITY_MQTTS_PORT<
  1192.       enabled: "${DEVICE_CONNECTIVITY_MQTTS_ENABLED:false}"
  1193.       # Host of mqtt transport service. If empty, the base URL host will be used.
  1194.       host: "${DEVICE_CONNECTIVITY_MQTTS_HOST:}"
  1195.       # Port of mqtt transport service. If empty, the default port for mqtts will be used.
  1196.       port: "${DEVICE_CONNECTIVITY_MQTTS_PORT:8883}"
  1197.       # Path to the MQTT CA root certificate file
  1198.       pem_cert_file: "${DEVICE_CONNECTIVITY_MQTTS_CA_ROOT_CERT:cafile.pem}"
  1199.     coap:
  1200.      # If true coap command will be included in the list of all test commands using DEVICE_CONNECTIVITY_COAP_HOST and DEVICE_CONNECTIVITY_COAP_PORT.
  1201.       enabled: "${DEVICE_CONNECTIVITY_COAP_ENABLED:true}"
  1202.       # Host of coap transport service. If empty, the base URL host will be used.
  1203.       host: "${DEVICE_CONNECTIVITY_COAP_HOST:}"
  1204.       # Port of coap transport service. If empty, the default port for coap will be used.
  1205.       port: "${DEVICE_CONNECTIVITY_COAP_PORT:5683}"
  1206.     coaps:
  1207.      # If true coap command will be included in the list of all test commands using DEVICE_CONNECTIVITY_COAPS_HOST and DEVICE_CONNECTIVITY_COAPS_PORT.
  1208.       enabled: "${DEVICE_CONNECTIVITY_COAPS_ENABLED:false}"
  1209.       # Host of coap transport service. If empty, the base URL host will be used.
  1210.       host: "${DEVICE_CONNECTIVITY_COAPS_HOST:}"
  1211.       # Port of coap transport service. If empty, the default port for coaps will be used.
  1212.       port: "${DEVICE_CONNECTIVITY_COAPS_PORT:5684}"
  1213.  
  1214. # Edges parameters
  1215. edges:
  1216.  # Enable/disable Edge instance
  1217.   enabled: "${EDGES_ENABLED:true}"
  1218.   rpc:
  1219.    # RPC port bind
  1220.     port: "${EDGES_RPC_PORT:7070}"
  1221.     # Maximum time of keeping alive client RPC connection. Time in seconds
  1222.     client_max_keep_alive_time_sec: "${EDGES_RPC_CLIENT_MAX_KEEP_ALIVE_TIME_SEC:1}"
  1223.     # Maximum time of keep-alive connection. Time in seconds
  1224.     keep_alive_time_sec: "${EDGES_RPC_KEEP_ALIVE_TIME_SEC:10}"
  1225.     # Timeout of keep alive RPC connection. Time in seconds
  1226.     keep_alive_timeout_sec: "${EDGES_RPC_KEEP_ALIVE_TIMEOUT_SEC:5}"
  1227.     ssl:
  1228.      # Enable/disable SSL support
  1229.       enabled: "${EDGES_RPC_SSL_ENABLED:false}"
  1230.       # Cert file to be used during TLS connectivity to the cloud
  1231.       cert: "${EDGES_RPC_SSL_CERT:certChainFile.pem}"
  1232.       # Private key file associated with the Cert certificate. This key is used in the encryption process during a secure connection
  1233.       private_key: "${EDGES_RPC_SSL_PRIVATE_KEY:privateKeyFile.pem}"
  1234.     # Maximum size (in bytes) of inbound messages the cloud can handle from the edge. By default, it can handle messages up to 4 Megabytes
  1235.     max_inbound_message_size: "${EDGES_RPC_MAX_INBOUND_MESSAGE_SIZE:4194304}"
  1236.   storage:
  1237.    # Max records of edge event to read from DB and sent to the edge
  1238.     max_read_records_count: "${EDGES_STORAGE_MAX_READ_RECORDS_COUNT:50}"
  1239.     # Number of milliseconds to wait before the next check of edge events in DB
  1240.     no_read_records_sleep: "${EDGES_NO_READ_RECORDS_SLEEP:1000}"
  1241.     # Number of milliseconds to wait before resending failed batch of edge events to edge
  1242.     sleep_between_batches: "${EDGES_SLEEP_BETWEEN_BATCHES:60000}"
  1243.   # Number of threads that are used to check DB for edge events
  1244.   scheduler_pool_size: "${EDGES_SCHEDULER_POOL_SIZE:1}"
  1245.   # Number of threads that are used to send downlink messages to edge over gRPC
  1246.   send_scheduler_pool_size: "${EDGES_SEND_SCHEDULER_POOL_SIZE:1}"
  1247.   # Number of threads that are used to convert edge events from DB into downlink messages and send them for delivery
  1248.   grpc_callback_thread_pool_size: "${EDGES_GRPC_CALLBACK_POOL_SIZE:1}"
  1249.   state:
  1250.    # Persist state of edge (active, last connect, last disconnect) into timeseries or attributes tables. 'false' means to store edge state into attributes table
  1251.     persistToTelemetry: "${EDGES_PERSIST_STATE_TO_TELEMETRY:false}"
  1252.  
  1253. # Swagger common parameters
  1254. swagger:
  1255.  # If false swagger API docs will be unavailable
  1256.   enabled: "${SWAGGER_ENABLED:true}"
  1257.   # General swagger match pattern of swagger UI links
  1258.   api_path_regex: "${SWAGGER_API_PATH_REGEX:/api/.*}"
  1259.   # General swagger match pattern path of swagger UI links
  1260.   security_path_regex: "${SWAGGER_SECURITY_PATH_REGEX:/api/.*}"
  1261.   # Nonsecurity API path match pattern of swagger UI links
  1262.   non_security_path_regex: "${SWAGGER_NON_SECURITY_PATH_REGEX:/api/(?:noauth|v1)/.*}"
  1263.   # The title on the API doc UI page
  1264.   title: "${SWAGGER_TITLE:ThingsBoard REST API}"
  1265.   # The description on the API doc UI page
  1266.   description: "${SWAGGER_DESCRIPTION: ThingsBoard open-source IoT platform REST API documentation.}"
  1267.   contact:
  1268.    # The contact name on the API doc UI page
  1269.     name: "${SWAGGER_CONTACT_NAME:ThingsBoard team}"
  1270.     # The contact URL on the API doc UI page
  1271.     url: "${SWAGGER_CONTACT_URL:https://thingsboard.io}"
  1272.     # The contact email on the API doc UI page
  1273.     email: "${SWAGGER_CONTACT_EMAIL:info@thingsboard.io}"
  1274.   license:
  1275.    # The license title on the API doc UI page
  1276.     title: "${SWAGGER_LICENSE_TITLE:Apache License Version 2.0}"
  1277.     # Link to the license body on the API doc UI page
  1278.     url: "${SWAGGER_LICENSE_URL:https://github.com/thingsboard/thingsboard/blob/master/LICENSE}"
  1279.   # The version of the API doc to display. Default to the package version.
  1280.   version: "${SWAGGER_VERSION:}"
  1281.  
  1282. # Queue configuration parameters
  1283. queue:
  1284.   type: "${TB_QUEUE_TYPE:in-memory}" # in-memory or kafka (Apache Kafka) or aws-sqs (AWS SQS) or pubsub (PubSub) or service-bus (Azure Service Bus) or rabbitmq (RabbitMQ)
  1285.   prefix: "${TB_QUEUE_PREFIX:}" # Global queue prefix. If specified, prefix is added before default topic name: 'prefix.default_topic_name'. Prefix is applied to all topics (and consumer groups for kafka).
  1286.   in_memory:
  1287.     stats:
  1288.      # For debug level
  1289.       print-interval-ms: "${TB_QUEUE_IN_MEMORY_STATS_PRINT_INTERVAL_MS:60000}"
  1290.   kafka:
  1291.    # Kafka Bootstrap nodes in "host:port" format
  1292.     bootstrap.servers: "${TB_KAFKA_SERVERS:localhost:9092}"
  1293.     ssl:
  1294.      # Enable/Disable SSL Kafka communication
  1295.       enabled: "${TB_KAFKA_SSL_ENABLED:false}"
  1296.       # The location of the trust store file
  1297.       truststore.location: "${TB_KAFKA_SSL_TRUSTSTORE_LOCATION:}"
  1298.       # The password of trust store file if specified
  1299.       truststore.password: "${TB_KAFKA_SSL_TRUSTSTORE_PASSWORD:}"
  1300.       # The location of the key store file. This is optional for the client and can be used for two-way authentication for the client
  1301.       keystore.location: "${TB_KAFKA_SSL_KEYSTORE_LOCATION:}"
  1302.       # The store password for the key store file. This is optional for the client and only needed if ‘ssl.keystore.location’ is configured. Key store password is not supported for PEM format
  1303.       keystore.password: "${TB_KAFKA_SSL_KEYSTORE_PASSWORD:}"
  1304.       # The password of the private key in the key store file or the PEM key specified in ‘keystore.key’
  1305.       key.password: "${TB_KAFKA_SSL_KEY_PASSWORD:}"
  1306.     # The number of acknowledgments the producer requires the leader to have received before considering a request complete. This controls the durability of records that are sent. The following settings are allowed:0, 1 and all
  1307.     acks: "${TB_KAFKA_ACKS:all}"
  1308.     # Number of retries. Resend any record whose send fails with a potentially transient error
  1309.     retries: "${TB_KAFKA_RETRIES:1}"
  1310.     # The compression type for all data generated by the producer. The default is none (i.e. no compression). Valid values none or gzip
  1311.     compression.type: "${TB_KAFKA_COMPRESSION_TYPE:none}" # none or gzip
  1312.     # Default batch size. This setting gives the upper bound of the batch size to be sent
  1313.     batch.size: "${TB_KAFKA_BATCH_SIZE:16384}"
  1314.     # This variable creates a small amount of artificial delay—that is, rather than immediately sending out a record
  1315.     linger.ms: "${TB_KAFKA_LINGER_MS:1}"
  1316.     # The maximum size of a request in bytes. This setting will limit the number of record batches the producer will send in a single request to avoid sending huge requests
  1317.     max.request.size: "${TB_KAFKA_MAX_REQUEST_SIZE:1048576}"
  1318.     # The maximum number of unacknowledged requests the client will send on a single connection before blocking
  1319.     max.in.flight.requests.per.connection: "${TB_KAFKA_MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION:5}"
  1320.     # The total bytes of memory the producer can use to buffer records waiting to be sent to the server
  1321.     buffer.memory: "${TB_BUFFER_MEMORY:33554432}"
  1322.     # The multiple copies of data over the multiple brokers of Kafka
  1323.     replication_factor: "${TB_QUEUE_KAFKA_REPLICATION_FACTOR:1}"
  1324.     # The maximum delay between invocations of poll() method when using consumer group management. This places an upper bound on the amount of time that the consumer can be idle before fetching more records
  1325.     max_poll_interval_ms: "${TB_QUEUE_KAFKA_MAX_POLL_INTERVAL_MS:300000}"
  1326.     # The maximum number of records returned in a single call of poll() method
  1327.     max_poll_records: "${TB_QUEUE_KAFKA_MAX_POLL_RECORDS:8192}"
  1328.     # The maximum amount of data per-partition the server will return. Records are fetched in batches by the consumer
  1329.     max_partition_fetch_bytes: "${TB_QUEUE_KAFKA_MAX_PARTITION_FETCH_BYTES:16777216}"
  1330.     # The maximum amount of data the server will return. Records are fetched in batches by the consumer
  1331.     fetch_max_bytes: "${TB_QUEUE_KAFKA_FETCH_MAX_BYTES:134217728}"
  1332.     request.timeout.ms: "${TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS:30000}" # (30 seconds) # refer to https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#producerconfigs_request.timeout.ms
  1333.     session.timeout.ms: "${TB_QUEUE_KAFKA_SESSION_TIMEOUT_MS:10000}" # (10 seconds) # refer to https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_session.timeout.ms
  1334.     auto_offset_reset: "${TB_QUEUE_KAFKA_AUTO_OFFSET_RESET:earliest}" # earliest, latest or none
  1335.     # Enable/Disable using of Confluent Cloud
  1336.     use_confluent_cloud: "${TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD:false}"
  1337.     confluent:
  1338.      # The endpoint identification algorithm used by clients to validate server hostname. The default value is https
  1339.       ssl.algorithm: "${TB_QUEUE_KAFKA_CONFLUENT_SSL_ALGORITHM:https}"
  1340.       # The mechanism used to authenticate Schema Registry requests. SASL/PLAIN should only be used with TLS/SSL as a transport layer to ensure that clear passwords are not transmitted on the wire without encryption
  1341.       sasl.mechanism: "${TB_QUEUE_KAFKA_CONFLUENT_SASL_MECHANISM:PLAIN}"
  1342.       # Using JAAS Configuration for specifying multiple SASL mechanisms on a broker
  1343.       sasl.config: "${TB_QUEUE_KAFKA_CONFLUENT_SASL_JAAS_CONFIG:org.apache.kafka.common.security.plain.PlainLoginModule required username=\"CLUSTER_API_KEY\" password=\"CLUSTER_API_SECRET\";}"
  1344.       # Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL
  1345.       security.protocol: "${TB_QUEUE_KAFKA_CONFLUENT_SECURITY_PROTOCOL:SASL_SSL}"
  1346.     # Key-value properties for Kafka consumer per specific topic, e.g. tb_ota_package is a topic name for ota, tb_rule_engine.sq is a topic name for default SequentialByOriginator queue.
  1347.     # Check TB_QUEUE_CORE_OTA_TOPIC and TB_QUEUE_RE_SQ_TOPIC params
  1348.     consumer-properties-per-topic:
  1349.       tb_ota_package:
  1350.        # Key-value properties for Kafka consumer per specific topic, e.g. tb_ota_package is a topic name for ota, tb_rule_engine.sq is a topic name for default SequentialByOriginator queue. Check TB_QUEUE_CORE_OTA_TOPIC and TB_QUEUE_RE_SQ_TOPIC params
  1351.         - key: max.poll.records
  1352.           # Example of specific consumer properties value per topic
  1353.           value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}"
  1354.       tb_version_control:
  1355.        # Example of specific consumer properties value per topic for VC
  1356.         - key: max.poll.interval.ms
  1357.           # Example of specific consumer properties value per topic for VC
  1358.           value: "${TB_QUEUE_KAFKA_VC_MAX_POLL_INTERVAL_MS:600000}"
  1359.     #      tb_rule_engine.sq:
  1360.     #        - key: max.poll.records
  1361.     #          value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}"
  1362.     other-inline: "${TB_QUEUE_KAFKA_OTHER_PROPERTIES:}" # In this section you can specify custom parameters (semicolon separated) for Kafka consumer/producer/admin # Example "metrics.recording.level:INFO;metrics.sample.window.ms:30000"
  1363.     other: # DEPRECATED. In this section, you can specify custom parameters for Kafka consumer/producer and expose the env variables to configure outside
  1364.     #  - key: "request.timeout.ms" # refer to https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#producerconfigs_request.timeout.ms
  1365.     #    value: "${TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS:30000}" # (30 seconds)
  1366.     #  - key: "session.timeout.ms" # refer to https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_session.timeout.ms
  1367.     #    value: "${TB_QUEUE_KAFKA_SESSION_TIMEOUT_MS:10000}" # (10 seconds)
  1368.     topic-properties:
  1369.      # Kafka properties for Rule Engine
  1370.       rule-engine: "${TB_QUEUE_KAFKA_RE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  1371.       # Kafka properties for Core topics
  1372.       core: "${TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  1373.       # Kafka properties for Transport Api topics
  1374.       transport-api: "${TB_QUEUE_KAFKA_TA_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:10;min.insync.replicas:1}"
  1375.       # Kafka properties for Notifications topics
  1376.       notifications: "${TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  1377.       # Kafka properties for JS Executor topics
  1378.       js-executor: "${TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:104857600;partitions:100;min.insync.replicas:1}"
  1379.       # Kafka properties for OTA updates topic
  1380.       ota-updates: "${TB_QUEUE_KAFKA_OTA_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:10;min.insync.replicas:1}"
  1381.       # Kafka properties for Version Control topic
  1382.       version-control: "${TB_QUEUE_KAFKA_VC_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  1383.     consumer-stats:
  1384.      # Prints lag between consumer group offset and last messages offset in Kafka topics
  1385.       enabled: "${TB_QUEUE_KAFKA_CONSUMER_STATS_ENABLED:true}"
  1386.       # Statistics printing interval for Kafka's consumer-groups stats
  1387.       print-interval-ms: "${TB_QUEUE_KAFKA_CONSUMER_STATS_MIN_PRINT_INTERVAL_MS:60000}"
  1388.       # Time to wait for the stats-loading requests to Kafka to finish
  1389.       kafka-response-timeout-ms: "${TB_QUEUE_KAFKA_CONSUMER_STATS_RESPONSE_TIMEOUT_MS:1000}"
  1390.   aws_sqs:
  1391.    # Use the default credentials provider for AWS SQS
  1392.     use_default_credential_provider_chain: "${TB_QUEUE_AWS_SQS_USE_DEFAULT_CREDENTIAL_PROVIDER_CHAIN:false}"
  1393.     # Access key ID from AWS IAM user
  1394.     access_key_id: "${TB_QUEUE_AWS_SQS_ACCESS_KEY_ID:YOUR_KEY}"
  1395.     # Secret access key from AWS IAM user
  1396.     secret_access_key: "${TB_QUEUE_AWS_SQS_SECRET_ACCESS_KEY:YOUR_SECRET}"
  1397.     # Region from AWS account
  1398.     region: "${TB_QUEUE_AWS_SQS_REGION:YOUR_REGION}"
  1399.     # Number of threads per each AWS SQS queue in consumer
  1400.     threads_per_topic: "${TB_QUEUE_AWS_SQS_THREADS_PER_TOPIC:1}"
  1401.     queue-properties:
  1402.      # AWS SQS queue properties. VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1403.       rule-engine: "${TB_QUEUE_AWS_SQS_RE_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1404.       # AWS SQS queue properties. VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1405.       core: "${TB_QUEUE_AWS_SQS_CORE_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1406.       # AWS SQS queue properties. VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1407.       transport-api: "${TB_QUEUE_AWS_SQS_TA_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1408.       # AWS SQS queue properties. VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1409.       notifications: "${TB_QUEUE_AWS_SQS_NOTIFICATIONS_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1410.       # VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800
  1411.       js-executor: "${TB_QUEUE_AWS_SQS_JE_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1412.       # VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1413.       ota-updates: "${TB_QUEUE_AWS_SQS_OTA_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1414.       # VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
  1415.       version-control: "${TB_QUEUE_AWS_SQS_VC_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
  1416.   pubsub:
  1417.    # Project ID from Google Cloud
  1418.     project_id: "${TB_QUEUE_PUBSUB_PROJECT_ID:YOUR_PROJECT_ID}"
  1419.     # API Credentials in JSON format
  1420.     service_account: "${TB_QUEUE_PUBSUB_SERVICE_ACCOUNT:YOUR_SERVICE_ACCOUNT}"
  1421.     # Message size for PubSub queue.Value in bytes
  1422.     max_msg_size: "${TB_QUEUE_PUBSUB_MAX_MSG_SIZE:1048576}"
  1423.     # Number of messages per consumer
  1424.     max_messages: "${TB_QUEUE_PUBSUB_MAX_MESSAGES:1000}"
  1425.     # Thread pool size for pubsub queue executor provider. If set to 0 - default pubsub executor provider value will be used (5 * number of available processors)
  1426.     executor_thread_pool_size: "${TB_QUEUE_PUBSUB_EXECUTOR_THREAD_POOL_SIZE:0}"
  1427.     queue-properties:
  1428.      # Pub/Sub properties for Rule Engine subscribers, messages which will commit after ackDeadlineInSec period can be consumed again
  1429.       rule-engine: "${TB_QUEUE_PUBSUB_RE_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1430.       # Pub/Sub properties for Core subscribers, messages which will commit after ackDeadlineInSec period can be consumed again
  1431.       core: "${TB_QUEUE_PUBSUB_CORE_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1432.       # Pub/Sub properties for Transport API subscribers, messages which will commit after ackDeadlineInSec period can be consumed again
  1433.       transport-api: "${TB_QUEUE_PUBSUB_TA_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1434.       # Pub/Sub properties for Version Control subscribers, messages which will commit after ackDeadlineInSec period can be consumed again
  1435.       notifications: "${TB_QUEUE_PUBSUB_NOTIFICATIONS_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1436.       # PubSub queue properties
  1437.       js-executor: "${TB_QUEUE_PUBSUB_JE_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1438.       # Pub/Sub properties for Transport Api subscribers, messages which will commit after ackDeadlineInSec period can be consumed again
  1439.       version-control: "${TB_QUEUE_PUBSUB_VC_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
  1440.   service_bus:
  1441.    # Azure namespace
  1442.     namespace_name: "${TB_QUEUE_SERVICE_BUS_NAMESPACE_NAME:YOUR_NAMESPACE_NAME}"
  1443.     # Azure Service Bus Shared Access Signatures key name
  1444.     sas_key_name: "${TB_QUEUE_SERVICE_BUS_SAS_KEY_NAME:YOUR_SAS_KEY_NAME}"
  1445.     # Azure Service Bus Shared Access Signatures key
  1446.     sas_key: "${TB_QUEUE_SERVICE_BUS_SAS_KEY:YOUR_SAS_KEY}"
  1447.     # Number of messages per a consumer
  1448.     max_messages: "${TB_QUEUE_SERVICE_BUS_MAX_MESSAGES:1000}"
  1449.     queue-properties:
  1450.      # Azure Service Bus properties for Rule Engine queues
  1451.       rule-engine: "${TB_QUEUE_SERVICE_BUS_RE_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1452.       # Azure Service Bus properties for Core queues
  1453.       core: "${TB_QUEUE_SERVICE_BUS_CORE_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1454.       # Azure Service Bus properties for Transport Api queues
  1455.       transport-api: "${TB_QUEUE_SERVICE_BUS_TA_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1456.       # Azure Service Bus properties for Notification queues
  1457.       notifications: "${TB_QUEUE_SERVICE_BUS_NOTIFICATIONS_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1458.       # Azure Service Bus queue properties
  1459.       js-executor: "${TB_QUEUE_SERVICE_BUS_JE_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1460.       # Azure Service Bus properties for Version Control queues
  1461.       version-control: "${TB_QUEUE_SERVICE_BUS_VC_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
  1462.   rabbitmq:
  1463.    # By default empty
  1464.     exchange_name: "${TB_QUEUE_RABBIT_MQ_EXCHANGE_NAME:}"
  1465.     # RabbitMQ host used to establish connection
  1466.     host: "${TB_QUEUE_RABBIT_MQ_HOST:localhost}"
  1467.     # RabbitMQ host used to establish a connection
  1468.     port: "${TB_QUEUE_RABBIT_MQ_PORT:5672}"
  1469.     # Virtual hosts provide logical grouping and separation of resources
  1470.     virtual_host: "${TB_QUEUE_RABBIT_MQ_VIRTUAL_HOST:/}"
  1471.     # Username for RabbitMQ user account
  1472.     username: "${TB_QUEUE_RABBIT_MQ_USERNAME:YOUR_USERNAME}"
  1473.     # User password for RabbitMQ user account
  1474.     password: "${TB_QUEUE_RABBIT_MQ_PASSWORD:YOUR_PASSWORD}"
  1475.     # Network connection between clients and RabbitMQ nodes can fail. RabbitMQ Java client supports automatic recovery of connections and topology (queues, exchanges, bindings, and consumers)
  1476.     automatic_recovery_enabled: "${TB_QUEUE_RABBIT_MQ_AUTOMATIC_RECOVERY_ENABLED:false}"
  1477.     # The connection timeout for the RabbitMQ connection factory
  1478.     connection_timeout: "${TB_QUEUE_RABBIT_MQ_CONNECTION_TIMEOUT:60000}"
  1479.     # RabbitMQ has a timeout for connection handshake. When clients run in heavily constrained environments, it may be necessary to increase the timeout
  1480.     handshake_timeout: "${TB_QUEUE_RABBIT_MQ_HANDSHAKE_TIMEOUT:10000}"
  1481.     queue-properties:
  1482.      # RabbitMQ properties for Rule Engine queues
  1483.       rule-engine: "${TB_QUEUE_RABBIT_MQ_RE_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1484.       # RabbitMQ properties for Core queues
  1485.       core: "${TB_QUEUE_RABBIT_MQ_CORE_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1486.       # RabbitMQ properties for Transport API queues
  1487.       transport-api: "${TB_QUEUE_RABBIT_MQ_TA_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1488.       # RabbitMQ properties for Notification queues
  1489.       notifications: "${TB_QUEUE_RABBIT_MQ_NOTIFICATIONS_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1490.       # RabbitMQ queue properties
  1491.       js-executor: "${TB_QUEUE_RABBIT_MQ_JE_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1492.       # RabbitMQ properties for Version Control queues
  1493.       version-control: "${TB_QUEUE_RABBIT_MQ_VC_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
  1494.   partitions:
  1495.     hash_function_name: "${TB_QUEUE_PARTITIONS_HASH_FUNCTION_NAME:murmur3_128}" # murmur3_32, murmur3_128 or sha256
  1496.   transport_api:
  1497.    # Topic used to consume api requests from transport microservices
  1498.     requests_topic: "${TB_QUEUE_TRANSPORT_API_REQUEST_TOPIC:tb_transport.api.requests}"
  1499.     # Topic used to produce api responses to transport microservices
  1500.     responses_topic: "${TB_QUEUE_TRANSPORT_API_RESPONSE_TOPIC:tb_transport.api.responses}"
  1501.     # Maximum pending api requests from transport microservices to be handled by server
  1502.     max_pending_requests: "${TB_QUEUE_TRANSPORT_MAX_PENDING_REQUESTS:10000}"
  1503.     # Maximum timeout in milliseconds to handle api request from transport microservice by server
  1504.     max_requests_timeout: "${TB_QUEUE_TRANSPORT_MAX_REQUEST_TIMEOUT:10000}"
  1505.     # Amount of threads used to invoke callbacks
  1506.     max_callback_threads: "${TB_QUEUE_TRANSPORT_MAX_CALLBACK_THREADS:100}"
  1507.     # Amount of threads used for transport API requests
  1508.     max_core_handler_threads: "${TB_QUEUE_TRANSPORT_MAX_CORE_HANDLER_THREADS:16}"
  1509.     # Interval in milliseconds to poll api requests from transport microservices
  1510.     request_poll_interval: "${TB_QUEUE_TRANSPORT_REQUEST_POLL_INTERVAL_MS:25}"
  1511.     # Interval in milliseconds to poll api response from transport microservices
  1512.     response_poll_interval: "${TB_QUEUE_TRANSPORT_RESPONSE_POLL_INTERVAL_MS:25}"
  1513.   core:
  1514.    # Default topic name of Kafka, RabbitMQ, etc. queue
  1515.     topic: "${TB_QUEUE_CORE_TOPIC:tb_core}"
  1516.     # Interval in milliseconds to poll messages by Core microservices
  1517.     poll-interval: "${TB_QUEUE_CORE_POLL_INTERVAL_MS:25}"
  1518.     # Amount of partitions used by Core microservices
  1519.     partitions: "${TB_QUEUE_CORE_PARTITIONS:10}"
  1520.     # Timeout for processing a message pack by Core microservices
  1521.     pack-processing-timeout: "${TB_QUEUE_CORE_PACK_PROCESSING_TIMEOUT_MS:2000}"
  1522.     ota:
  1523.      # Default topic name for OTA updates
  1524.       topic: "${TB_QUEUE_CORE_OTA_TOPIC:tb_ota_package}"
  1525.       # The interval of processing the OTA updates for devices. Used to avoid any harm to the network due to many parallel OTA updates
  1526.       pack-interval-ms: "${TB_QUEUE_CORE_OTA_PACK_INTERVAL_MS:60000}"
  1527.       # The size of OTA updates notifications fetched from the queue. The queue stores pairs of firmware and device ids
  1528.       pack-size: "${TB_QUEUE_CORE_OTA_PACK_SIZE:100}"
  1529.     # Stats topic name for queue Kafka, RabbitMQ, etc.
  1530.     usage-stats-topic: "${TB_QUEUE_US_TOPIC:tb_usage_stats}"
  1531.     stats:
  1532.      # Enable/disable statistics for Core microservices
  1533.       enabled: "${TB_QUEUE_CORE_STATS_ENABLED:true}"
  1534.       # Statistics printing interval for Core microservices
  1535.       print-interval-ms: "${TB_QUEUE_CORE_STATS_PRINT_INTERVAL_MS:60000}"
  1536.   vc:
  1537.    # Default topic name for Kafka, RabbitMQ, etc.
  1538.     topic: "${TB_QUEUE_VC_TOPIC:tb_version_control}"
  1539.     # Number of partitions to associate with this queue. Used for scaling the number of messages that can be processed in parallel
  1540.     partitions: "${TB_QUEUE_VC_PARTITIONS:10}"
  1541.     # Interval in milliseconds between polling of the messages if no new messages arrive
  1542.     poll-interval: "${TB_QUEUE_VC_INTERVAL_MS:25}"
  1543.     # Timeout before retrying all failed and timed-out messages from the processing pack
  1544.     pack-processing-timeout: "${TB_QUEUE_VC_PACK_PROCESSING_TIMEOUT_MS:180000}"
  1545.     # Timeout for a request to VC-executor (for a request for the version of the entity, for a commit charge, etc.)
  1546.     request-timeout: "${TB_QUEUE_VC_REQUEST_TIMEOUT:180000}"
  1547.     # Queue settings for Kafka, RabbitMQ, etc. Limit for single message size
  1548.     msg-chunk-size: "${TB_QUEUE_VC_MSG_CHUNK_SIZE:250000}"
  1549.   js:
  1550.    # JS Eval request topic
  1551.     request_topic: "${REMOTE_JS_EVAL_REQUEST_TOPIC:js_eval.requests}"
  1552.     # JS Eval responses topic prefix that is combined with node id
  1553.     response_topic_prefix: "${REMOTE_JS_EVAL_RESPONSE_TOPIC:js_eval.responses}"
  1554.     # JS Eval max pending requests
  1555.     max_pending_requests: "${REMOTE_JS_MAX_PENDING_REQUESTS:10000}"
  1556.     # JS Eval max request timeout
  1557.     max_eval_requests_timeout: "${REMOTE_JS_MAX_EVAL_REQUEST_TIMEOUT:60000}"
  1558.     # JS max request timeout
  1559.     max_requests_timeout: "${REMOTE_JS_MAX_REQUEST_TIMEOUT:10000}"
  1560.     # JS execution max request timeout
  1561.     max_exec_requests_timeout: "${REMOTE_JS_MAX_EXEC_REQUEST_TIMEOUT:2000}"
  1562.     # JS response poll interval
  1563.     response_poll_interval: "${REMOTE_JS_RESPONSE_POLL_INTERVAL_MS:25}"
  1564.   rule-engine:
  1565.    # Deprecated. It will be removed in the nearest releases
  1566.     topic: "${TB_QUEUE_RULE_ENGINE_TOPIC:tb_rule_engine}"
  1567.     # Interval in milliseconds to poll messages by Rule Engine
  1568.     poll-interval: "${TB_QUEUE_RULE_ENGINE_POLL_INTERVAL_MS:25}"
  1569.     # Timeout for processing a message pack of Rule Engine
  1570.     pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:2000}"
  1571.     stats:
  1572.      # Enable/disable statistics for Rule Engine
  1573.       enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
  1574.       # Statistics printing interval for Rule Engine
  1575.       print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:60000}"
  1576.       # Max length of the error message that is printed by statistics
  1577.       max-error-message-length: "${TB_QUEUE_RULE_ENGINE_MAX_ERROR_MESSAGE_LENGTH:4096}"
  1578.     queues:
  1579.       - name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}" # queue name
  1580.         topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}" # queue topic
  1581.         poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}" # poll interval
  1582.         partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}" # number queue partitions
  1583.         consumer-per-partition: "${TB_QUEUE_RE_MAIN_CONSUMER_PER_PARTITION:true}" # if true - use for each customer different partition
  1584.         pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:2000}" # Timeout for processing a message pack
  1585.         submit-strategy:
  1586.           type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
  1587.           # For BATCH only
  1588.           batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
  1589.         processing-strategy:
  1590.           type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:SKIP_ALL_FAILURES}" # SKIP_ALL_FAILURES, SKIP_ALL_FAILURES_AND_TIMED_OUT, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1591.           # For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1592.           retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
  1593.           failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less than X percentage of messages;
  1594.           pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRY_PAUSE:3}" # Time in seconds to wait in consumer thread before retries;
  1595.           max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:3}" # Max allowed time in seconds for pause between retries.
  1596.       - name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}" # queue name
  1597.         topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}" # queue topic
  1598.         poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}" # poll interval
  1599.         partitions: "${TB_QUEUE_RE_HP_PARTITIONS:10}"  # number queue partitions
  1600.         consumer-per-partition: "${TB_QUEUE_RE_HP_CONSUMER_PER_PARTITION:true}" # if true - use for each customer different partition
  1601.         pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:2000}" # Timeout for processing a message pack
  1602.         submit-strategy:
  1603.           type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
  1604.           # For BATCH only
  1605.           batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
  1606.         processing-strategy:
  1607.           type: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, SKIP_ALL_FAILURES_AND_TIMED_OUT, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1608.           # For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1609.           retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
  1610.           failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less than X percentage of messages;
  1611.           pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}" # Time in seconds to wait in consumer thread before retries;
  1612.           max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:5}" # Max allowed time in seconds for pause between retries.
  1613.       - name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}" # queue name
  1614.         topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}" # queue topic
  1615.         poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}" # poll interval
  1616.         partitions: "${TB_QUEUE_RE_SQ_PARTITIONS:10}" # number queue partitions
  1617.         consumer-per-partition: "${TB_QUEUE_RE_SQ_CONSUMER_PER_PARTITION:true}" # if true - use for each customer different partition
  1618.         pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:2000}" # Timeout for processing a message pack
  1619.         submit-strategy:
  1620.           type: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_BY_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
  1621.           # For BATCH only
  1622.           batch-size: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
  1623.         processing-strategy:
  1624.           type: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, SKIP_ALL_FAILURES_AND_TIMED_OUT, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1625.           # For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
  1626.           retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
  1627.           failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less than X percentage of messages;
  1628.           pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}" # Time in seconds to wait in consumer thread before retries;
  1629.           max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:5}" # Max allowed time in seconds for pause between retries.
  1630.     # After a queue is deleted (or the profile's isolation option was disabled), Rule Engine will continue reading related topics during this period before deleting the actual topics
  1631.     topic-deletion-delay: "${TB_QUEUE_RULE_ENGINE_TOPIC_DELETION_DELAY_SEC:15}"
  1632.     # Size of the thread pool that handles such operations as partition changes, config updates, queue deletion
  1633.     management-thread-pool-size: "${TB_QUEUE_RULE_ENGINE_MGMT_THREAD_POOL_SIZE:12}"
  1634.   transport:
  1635.    # For high-priority notifications that require minimum latency and processing time
  1636.     notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
  1637.     # Interval in milliseconds to poll messages
  1638.     poll_interval: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_POLL_INTERVAL_MS:25}"
  1639.  
  1640. # Event configuration parameters
  1641. event:
  1642.   debug:
  1643.    # Maximum number of symbols per debug event. The event content will be truncated if needed
  1644.     max-symbols: "${TB_MAX_DEBUG_EVENT_SYMBOLS:4096}"
  1645.  
  1646. # General service parameters
  1647. service:
  1648.   type: "${TB_SERVICE_TYPE:monolith}" # monolith or tb-core or tb-rule-engine
  1649.   # Unique id for this service (autogenerated if empty)
  1650.   id: "${TB_SERVICE_ID:}"
  1651.   rule_engine:
  1652.    # Comma-separated list of tenant profile ids assigned to this Rule Engine.
  1653.     # This Rule Engine will only be responsible for tenants with these profiles (in case 'isolation' option is enabled in the profile).
  1654.     assigned_tenant_profiles: "${TB_RULE_ENGINE_ASSIGNED_TENANT_PROFILES:}"
  1655.     pubsub:
  1656.      # Thread pool size for pubsub rule node executor provider. If not set - default pubsub executor provider value will be used (5 * number of available processors)
  1657.       executor_thread_pool_size: "${TB_RULE_ENGINE_PUBSUB_EXECUTOR_THREAD_POOL_SIZE:0}"
  1658.  
  1659. # Metrics parameters
  1660. metrics:
  1661.  # Enable/disable actuator metrics.
  1662.   enabled: "${METRICS_ENABLED:false}"
  1663.   timer:
  1664.    # Metrics percentiles returned by actuator for timer metrics. List of double values (divided by ,).
  1665.     percentiles: "${METRICS_TIMER_PERCENTILES:0.5}"
  1666.   system_info:
  1667.    # Persist frequency of system info (CPU, memory usage, etc.) in seconds
  1668.     persist_frequency: "${METRICS_SYSTEM_INFO_PERSIST_FREQUENCY_SECONDS:60}"
  1669.     # TTL in days for system info timeseries
  1670.     ttl: "${METRICS_SYSTEM_INFO_TTL_DAYS:7}"
  1671.  
  1672. # Version control parameters
  1673. vc:
  1674.  # Pool size for handling export tasks
  1675.   thread_pool_size: "${TB_VC_POOL_SIZE:6}"
  1676.   git:
  1677.    # Pool size for handling the git IO operations
  1678.     io_pool_size: "${TB_VC_GIT_POOL_SIZE:3}"
  1679.     # Default storing repository path
  1680.     repositories-folder: "${TB_VC_GIT_REPOSITORIES_FOLDER:${java.io.tmpdir}/repositories}"
  1681.  
  1682. # Notification system parameters
  1683. notification_system:
  1684.  # Specify thread pool size for Notification System processing notification rules and notification sending. Recommend value <= 10
  1685.   thread_pool_size: "${TB_NOTIFICATION_SYSTEM_THREAD_POOL_SIZE:10}"
  1686.   rules:
  1687.    # Semicolon-separated deduplication durations (in millis) for trigger types. Format: 'NotificationRuleTriggerType1:123;NotificationRuleTriggerType2:456'
  1688.     deduplication_durations: "${TB_NOTIFICATION_RULES_DEDUPLICATION_DURATIONS:NEW_PLATFORM_VERSION:0;RATE_LIMITS:14400000;}"
  1689.  
  1690. # General management parameters
  1691. management:
  1692.   endpoints:
  1693.     web:
  1694.       exposure:
  1695.        # Expose metrics endpoint (use value 'prometheus' to enable prometheus metrics).
  1696.         include: '${METRICS_ENDPOINTS_EXPOSE:info}'
Add Comment
Please, Sign In to add comment