This guide will help you become familiar with TBMQ configuration files and parameters. We strongly recommend configuring TBMQ using environment variables. This way, you won’t need to merge the configuration files when a new platform release arrives.
The list of available configuration parameters and corresponding environment variables can be found here.
How to change configuration parameters?
Docker-Based deployment
If TBMQ is installed in a Docker Compose environment, you can edit the scripts and add environment variables for the corresponding containers. For more details, refer to the Docker documentation.
K8S-Based deployment
If TBMQ is installed in a K8S environment, you can edit the scripts and add environment variables for the corresponding deployments/stateful sets. For more details, refer to the K8S documentation.
Configuration parameters
The configuration file is written in YAML format. All configuration parameters have corresponding environment variable names and default values. To change a configuration parameter, simply modify its default value. For example:
1
2
server:
address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
In this case, ‘HTTP_BIND_ADDRESS’ is the environment variable name and ‘0.0.0.0’ is the default value.
You can use the simple example below to add a new environment variable ‘HTTP_BIND_PORT’ with value ‘8084’.
1
2
...
export HTTP_BIND_PORT=8084
The parameters are grouped by system components. The list contains the name (address in thingsboard-mqtt-broker.yml file), environment variable, default value, and description.
Parameter | Environment Variable | Default Value | Description |
TCP MQTT listener parameters | |||
listener.tcp.enabled | LISTENER_TCP_ENABLED | true | Enable/disable MQTT TCP port listener |
listener.tcp.bind_address | LISTENER_TCP_BIND_ADDRESS | 0.0.0.0 | MQTT TCP listener bind address |
listener.tcp.bind_port | LISTENER_TCP_BIND_PORT | 1883 | MQTT TCP listener bind port |
listener.tcp.netty.leak_detector_level | TCP_NETTY_LEAK_DETECTOR_LVL | DISABLED | Netty leak detector level |
listener.tcp.netty.boss_group_thread_count | TCP_NETTY_BOSS_GROUP_THREADS | 1 | Netty boss group threads count |
listener.tcp.netty.worker_group_thread_count | TCP_NETTY_WORKER_GROUP_THREADS | 12 | Netty worker group threads count |
listener.tcp.netty.max_payload_size | TCP_NETTY_MAX_PAYLOAD_SIZE | 65536 | Max payload size in bytes |
listener.tcp.netty.so_keep_alive | TCP_NETTY_SO_KEEPALIVE | true | Enable/disable keep-alive mechanism to periodically probe the other end of a connection |
listener.tcp.netty.shutdown_quiet_period | TCP_NETTY_SHUTDOWN_QUIET_PERIOD | 0 | Period in seconds in graceful shutdown during which no new tasks are submitted |
listener.tcp.netty.shutdown_timeout | TCP_NETTY_SHUTDOWN_TIMEOUT | 5 | The max time in seconds to wait until the executor is stopped |
SSL MQTT listener parameters | |||
listener.ssl.enabled | LISTENER_SSL_ENABLED | false | Enable/disable MQTT SSL port listener |
listener.ssl.bind_address | LISTENER_SSL_BIND_ADDRESS | 0.0.0.0 | MQTT SSL listener bind address |
listener.ssl.bind_port | LISTENER_SSL_BIND_PORT | 8883 | MQTT SSL listener bind port |
listener.ssl.netty.leak_detector_level | SSL_NETTY_LEAK_DETECTOR_LVL | DISABLED | Netty leak detector level |
listener.ssl.netty.boss_group_thread_count | SSL_NETTY_BOSS_GROUP_THREADS | 1 | Netty boss group threads count |
listener.ssl.netty.worker_group_thread_count | SSL_NETTY_WORKER_GROUP_THREADS | 12 | Netty worker group threads count |
listener.ssl.netty.max_payload_size | SSL_NETTY_MAX_PAYLOAD_SIZE | 65536 | Max payload size in bytes |
listener.ssl.netty.so_keep_alive | SSL_NETTY_SO_KEEPALIVE | true | Enable/disable keep-alive mechanism to periodically probe the other end of a connection |
listener.ssl.netty.shutdown_quiet_period | SSL_NETTY_SHUTDOWN_QUIET_PERIOD | 0 | Period in seconds in graceful shutdown during which no new tasks are submitted |
listener.ssl.netty.shutdown_timeout | SSL_NETTY_SHUTDOWN_TIMEOUT | 5 | The max time in seconds to wait until the executor is stopped |
listener.ssl.config.protocol | LISTENER_SSL_PROTOCOL | TLSv1.2 | SSL protocol: see this link |
listener.ssl.config.credentials.type | LISTENER_SSL_CREDENTIALS_TYPE | PEM | Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) |
listener.ssl.config.credentials.pem.cert_file | LISTENER_SSL_PEM_CERT | mqttserver.pem | Path to the server certificate file (holds server certificate or certificate chain, may include server private key) |
listener.ssl.config.credentials.pem.key_file | LISTENER_SSL_PEM_KEY | mqttserver_key.pem | Path to the server certificate private key file (optional) |
listener.ssl.config.credentials.pem.key_password | LISTENER_SSL_PEM_KEY_PASSWORD | server_key_password | Server certificate private key password (optional) |
listener.ssl.config.credentials.keystore.type | LISTENER_SSL_KEY_STORE_TYPE | JKS | Type of the key store |
listener.ssl.config.credentials.keystore.store_file | LISTENER_SSL_KEY_STORE | mqttserver.jks | Path to the key store that holds the SSL certificate |
listener.ssl.config.credentials.keystore.store_password | LISTENER_SSL_KEY_STORE_PASSWORD | server_ks_password | Password used to access the key store |
listener.ssl.config.credentials.keystore.key_alias | LISTENER_SSL_KEY_ALIAS | Key alias | |
listener.ssl.config.credentials.keystore.key_password | LISTENER_SSL_KEY_PASSWORD | server_key_password | Password used to access the key |
WS MQTT listener parameters | |||
listener.ws.enabled | LISTENER_WS_ENABLED | true | Enable/disable MQTT WS port listener |
listener.ws.bind_address | LISTENER_WS_BIND_ADDRESS | 0.0.0.0 | MQTT WS listener bind address |
listener.ws.bind_port | LISTENER_WS_BIND_PORT | 8084 | MQTT WS listener bind port |
listener.ws.netty.sub_protocols | WS_NETTY_SUB_PROTOCOLS | mqttv3.1,mqtt | Comma-separated list of subprotocols that the WebSocket can negotiate. The subprotocol setting `mqtt` represents MQTT 3.1.1 and MQTT 5 |
listener.ws.netty.leak_detector_level | WS_NETTY_LEAK_DETECTOR_LVL | DISABLED | Netty leak detector level |
listener.ws.netty.boss_group_thread_count | WS_NETTY_BOSS_GROUP_THREADS | 1 | Netty boss group threads count |
listener.ws.netty.worker_group_thread_count | WS_NETTY_WORKER_GROUP_THREADS | 12 | Netty worker group threads count |
listener.ws.netty.max_payload_size | WS_NETTY_MAX_PAYLOAD_SIZE | 65536 | Max payload size in bytes |
listener.ws.netty.so_keep_alive | WS_NETTY_SO_KEEPALIVE | true | Enable/disable keep-alive mechanism to periodically probe the other end of a connection |
listener.ws.netty.shutdown_quiet_period | WS_NETTY_SHUTDOWN_QUIET_PERIOD | 0 | Period in seconds in graceful shutdown during which no new tasks are submitted |
listener.ws.netty.shutdown_timeout | WS_NETTY_SHUTDOWN_TIMEOUT | 5 | The max time in seconds to wait until the executor is stopped |
WSS MQTT listener parameters | |||
listener.wss.enabled | LISTENER_WSS_ENABLED | false | Enable/disable MQTT WSS port listener |
listener.wss.bind_address | LISTENER_WSS_BIND_ADDRESS | 0.0.0.0 | MQTT WSS listener bind address |
listener.wss.bind_port | LISTENER_WSS_BIND_PORT | 8085 | MQTT WSS listener bind port |
listener.wss.netty.sub_protocols | WSS_NETTY_SUB_PROTOCOLS | mqttv3.1,mqtt | Comma-separated list of subprotocols that the WebSocket can negotiate. The subprotocol setting `mqtt` represents MQTT 3.1.1 and MQTT 5 |
listener.wss.netty.leak_detector_level | WSS_NETTY_LEAK_DETECTOR_LVL | DISABLED | Netty leak detector level |
listener.wss.netty.boss_group_thread_count | WSS_NETTY_BOSS_GROUP_THREADS | 1 | Netty boss group threads count |
listener.wss.netty.worker_group_thread_count | WSS_NETTY_WORKER_GROUP_THREADS | 12 | Netty worker group threads count |
listener.wss.netty.max_payload_size | WSS_NETTY_MAX_PAYLOAD_SIZE | 65536 | Max payload size in bytes |
listener.wss.netty.so_keep_alive | WSS_NETTY_SO_KEEPALIVE | true | Enable/disable keep-alive mechanism to periodically probe the other end of a connection |
listener.wss.netty.shutdown_quiet_period | WSS_NETTY_SHUTDOWN_QUIET_PERIOD | 0 | Period in seconds in graceful shutdown during which no new tasks are submitted |
listener.wss.netty.shutdown_timeout | WSS_NETTY_SHUTDOWN_TIMEOUT | 5 | The max time in seconds to wait until the executor is stopped |
listener.wss.config.protocol | LISTENER_WSS_PROTOCOL | TLSv1.2 | SSL protocol: see this link |
listener.wss.config.credentials.type | LISTENER_WSS_CREDENTIALS_TYPE | PEM | Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) |
listener.wss.config.credentials.pem.cert_file | LISTENER_WSS_PEM_CERT | ws_mqtt_server.pem | Path to the server certificate file (holds server certificate or certificate chain, may include server private key) |
listener.wss.config.credentials.pem.key_file | LISTENER_WSS_PEM_KEY | ws_mqtt_server_key.pem | Path to the server certificate private key file (optional) |
listener.wss.config.credentials.pem.key_password | LISTENER_WSS_PEM_KEY_PASSWORD | ws_server_key_password | Server certificate private key password (optional) |
listener.wss.config.credentials.keystore.type | LISTENER_WSS_KEY_STORE_TYPE | JKS | Type of the key store |
listener.wss.config.credentials.keystore.store_file | LISTENER_WSS_KEY_STORE | ws_mqtt_server.jks | Path to the key store that holds the SSL certificate |
listener.wss.config.credentials.keystore.store_password | LISTENER_WSS_KEY_STORE_PASSWORD | ws_server_ks_password | Password used to access the key store |
listener.wss.config.credentials.keystore.key_alias | LISTENER_WSS_KEY_ALIAS | Key alias | |
listener.wss.config.credentials.keystore.key_password | LISTENER_WSS_KEY_PASSWORD | ws_server_key_password | Password used to access the key |
HTTP server parameters | |||
server.shutdown | SERVER_SHUTDOWN | graceful | Shutdown type (graceful or immediate) |
server.address | HTTP_BIND_ADDRESS | 0.0.0.0 | HTTP Server bind address |
server.port | HTTP_BIND_PORT | 8083 | HTTP Server bind port |
server.ssl.enabled | SSL_ENABLED | false | Enable/disable SSL support |
server.ssl.credentials.type | SSL_CREDENTIALS_TYPE | PEM | Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore) |
server.ssl.credentials.pem.cert_file | SSL_PEM_CERT | server.pem | Path to the server certificate file (holds server certificate or certificate chain, may include server private key) |
server.ssl.credentials.pem.key_file | SSL_PEM_KEY | server_key.pem | Path to the server certificate private key file (optional) |
server.ssl.credentials.pem.key_password | SSL_PEM_KEY_PASSWORD | server_key_password | Server certificate private key password (optional) |
server.ssl.credentials.keystore.type | SSL_KEY_STORE_TYPE | PKCS12 | Type of the key store |
server.ssl.credentials.keystore.store_file | SSL_KEY_STORE | classpath:keystore/keystore.p12 | Path to the key store that holds the SSL certificate |
server.ssl.credentials.keystore.store_password | SSL_KEY_STORE_PASSWORD | thingsboard_mqtt_broker | Password used to access the key store |
server.ssl.credentials.keystore.key_alias | SSL_KEY_ALIAS | tomcat | Key alias |
server.ssl.credentials.keystore.key_password | SSL_KEY_PASSWORD | thingsboard_mqtt_broker | Password used to access the key |
server.log_controller_error_stack_trace | HTTP_LOG_CONTROLLER_ERROR_STACK_TRACE | false | Log errors with stacktrace when REST API throws exception |
HTTP Security parameters | |||
security.jwt.tokenExpirationTime | JWT_TOKEN_EXPIRATION_TIME | 9000 | User JWT Token expiration time in seconds |
security.jwt.refreshTokenExpTime | JWT_REFRESH_TOKEN_EXPIRATION_TIME | 604800 | User JWT Refresh Token expiration time in seconds |
security.jwt.tokenIssuer | JWT_TOKEN_ISSUER | thingsboard.io | User JWT Token issuer |
security.jwt.tokenSigningKey | JWT_TOKEN_SIGNING_KEY | thingsboardDefaultSigningKey | User JWT Token sign key |
security.user_login_case_sensitive | SECURITY_USER_LOGIN_CASE_SENSITIVE | true | Enable/disable case-sensitive username login |
MQTT Security parameters | |||
security.mqtt.auth_strategy | SECURITY_MQTT_AUTH_STRATEGY | BOTH | BOTH or SINGLE - the former means the first attempt of client authentication will be by 'basic' provider and then by 'ssl' provider if 'basic' is not successful; the latter means only one attempt is done according to the listener communication chosen |
security.mqtt.basic.enabled | SECURITY_MQTT_BASIC_ENABLED | false | Enable/disable basic MQTT auth |
security.mqtt.ssl.enabled | SECURITY_MQTT_SSL_ENABLED | false | Enable/disable SSL MQTT auth |
security.mqtt.ssl.skip_validity_check_for_client_cert | SECURITY_MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT | false | Skip check of client certificate validity |
Actor system parameters | |||
actors.system.throughput | ACTORS_SYSTEM_THROUGHPUT | 5 | Number of messages the actor system will process per actor before switching to processing of messages for next actor |
actors.system.scheduler-pool-size | ACTORS_SYSTEM_SCHEDULER_POOL_SIZE | 1 | Thread pool size for actor system scheduler |
actors.system.max-actor-init-attempts | ACTORS_SYSTEM_MAX_ACTOR_INIT_ATTEMPTS | 10 | Maximum number of attempts to init the actor before disabling the actor |
actors.system.processing-metrics.enabled | ACTORS_SYSTEM_PROCESSING_METRICS_ENABLED | false | Enable/disable actors processing metrics |
actors.system.disconnect-wait-timeout-ms | ACTORS_SYSTEM_DISCONNECT_WAIT_TIMEOUT_MS | 2000 | Actors disconnect timeout in milliseconds |
actors.persisted-device.dispatcher-pool-size | ACTORS_SYSTEM_PERSISTED_DEVICE_DISPATCHER_POOL_SIZE | 4 | Number of threads processing the Device actor's messages |
actors.persisted-device.wait-before-actor-stop-minutes | ACTORS_SYSTEM_PERSISTED_DEVICE_WAIT_BEFORE_ACTOR_STOP_MINUTES | 5 | Minutes to wait before deleting Device actor after disconnect |
actors.client.dispatcher-pool-size | ACTORS_SYSTEM_CLIENT_DISPATCHER_POOL_SIZE | 4 | Number of threads processing the MQTT client actors messages |
actors.client.wait-before-generated-actor-stop-seconds | ACTORS_SYSTEM_CLIENT_WAIT_BEFORE_GENERATED_ACTOR_STOP_SECONDS | 10 | Time in seconds to wait until the actor is stopped for clients that did not specify client id |
actors.client.wait-before-named-actor-stop-seconds | ACTORS_SYSTEM_CLIENT_WAIT_BEFORE_NAMED_ACTOR_STOP_SECONDS | 60 | Time in seconds to wait until the actor is stopped for clients that specified client id |
actors.rule.mail_thread_pool_size | ACTORS_RULE_MAIL_THREAD_POOL_SIZE | 4 | Thread pool size for mail sender executor service |
actors.rule.mail_password_reset_thread_pool_size | ACTORS_RULE_MAIL_PASSWORD_RESET_THREAD_POOL_SIZE | 4 | Thread pool size for password reset emails executor service |
MQTT parameters | |||
mqtt.connect.threads | MQTT_CONNECT_THREADS | 4 | Number of threads for clients connection thread pool |
mqtt.msg-subscriptions-parallel-processing | MQTT_MSG_SUBSCRIPTIONS_PARALLEL_PROCESSING | false | Enable/disable processing of found subscriptions in parallel for published messages |
mqtt.pre-connect-queue.max-size | MQTT_PRE_CONNECT_QUEUE_MAX_SIZE | 10000 | Max number of messages stored in queue before client gets connected |
mqtt.max-in-flight-msgs | MQTT_MAX_IN_FLIGHT_MSGS | 1000 | Max number of PUBLISH or PUBREL messages not yet responded |
mqtt.retransmission.enabled | MQTT_RETRANSMISSION_ENABLED | false | Enable/disable MQTT msg retransmission |
mqtt.retransmission.scheduler-pool-size | MQTT_RETRANSMISSION_SCHEDULER_POOL_SIZE | 0 | Retransmission scheduler pool size (0 means the number of processors available to the JVM multiplied by 2 will be used) |
mqtt.retransmission.initial-delay | MQTT_RETRANSMISSION_INITIAL_DELAY | 10 | Initial delay for the msg retransmission in seconds |
mqtt.retransmission.period | MQTT_RETRANSMISSION_PERIOD | 5 | Increment period for the subsequent retransmissions of the msg in seconds (retransmission interval is increased by period for each run) |
mqtt.keep-alive.monitoring-delay-ms | MQTT_KEEP_ALIVE_MONITORING_DELAY_MS | 100 | Time in milliseconds between subsequent checks for the non-active clients |
mqtt.keep-alive.max-keep-alive | MQTT_KEEP_ALIVE_MAX_KEEP_ALIVE_SEC | 600 | Max value in seconds allowed by the server for keep-alive that can be used by clients |
mqtt.topic.max-segments-count | MQTT_TOPIC_MAX_SEGMENTS_COUNT | 0 | Maximum number of segments in topics. If it's too large, processing of topics with too much segments can lead to errors. 0 means limitation is disabled |
mqtt.topic.alias-max | MQTT_TOPIC_ALIAS_MAX | 10 | Max count of topic aliases per connection. 0 indicates that the Broker does not accept any Topic Aliases for all connections meaning the 'Topic Alias' feature is disabled |
mqtt.topic.min-length-for-alias-replacement | MQTT_TOPIC_MIN_LENGTH_FOR_ALIAS_REPLACEMENT | 50 | Minimal required topic name length that Broker publishes to client that can be replaced with topic alias |
mqtt.shared-subscriptions.processing-type | MQTT_SHARED_SUBSCRIPTIONS_PROCESSING_TYPE | ROUND_ROBIN | Processing strategy type - how messages are split between clients in shared subscription |
mqtt.subscription-trie.wait-for-clear-lock-ms | MQTT_SUB_TRIE_WAIT_FOR_CLEAR_LOCK_MS | 100 | Maximum pause in milliseconds for clearing subscription storage from empty nodes |
mqtt.subscription-trie.clear-nodes-cron | MQTT_SUB_TRIE_CLEAR_NODES_CRON | 0 0 0 * * * | Cron job to schedule clearing of empty subscription nodes. Defaults to 'every day at midnight' |
mqtt.subscription-trie.clear-nodes-zone | MQTT_SUB_TRIE_CLEAR_NODES_ZONE | UTC | Timezone for the subscription clearing cron-job |
mqtt.retain-msg-trie.wait-for-clear-lock-ms | MQTT_RETAIN_MSG_TRIE_WAIT_FOR_CLEAR_LOCK_MS | 100 | Maximum pause in milliseconds for clearing retain msg storage from empty nodes |
mqtt.retain-msg-trie.clear-nodes-cron | MQTT_RETAIN_MSG_TRIE_CLEAR_NODES_CRON | 0 0 0 * * * | Cron job to schedule clearing of empty retain msg nodes. Defaults to 'every day at midnight' |
mqtt.retain-msg-trie.clear-nodes-zone | MQTT_RETAIN_MSG_TRIE_CLEAR_NODES_ZONE | UTC | Timezone for retain msg clearing cron-job |
mqtt.retain-msg.expiry-processing-period-ms | MQTT_RETAIN_MSG_EXPIRY_PROCESSING_PERIOD_MS | 60000 | Period in milliseconds to clear retained messages by expiry feature of MQTT |
mqtt.client-session-expiry.cron | MQTT_CLIENT_SESSION_EXPIRY_CRON | 0 0 * ? * * | Cron job to schedule clearing of expired and not active client-sessions. Defaults to 'every hour', e.g. at 20:00:00 UTC |
mqtt.client-session-expiry.zone | MQTT_CLIENT_SESSION_EXPIRY_ZONE | UTC | Timezone for the client sessions clearing cron-job |
mqtt.client-session-expiry.max-expiry-interval | MQTT_CLIENT_SESSION_EXPIRY_MAX_EXPIRY_INTERVAL | 604800 | Max expiry interval allowed for client-sessions in seconds. Defaults to one week |
mqtt.client-session-expiry.ttl | MQTT_CLIENT_SESSION_EXPIRY_TTL | 604800 | Administration TTL in seconds for clearing sessions that do not expire by session expiry interval |
mqtt.version-3-1.max-client-id-length | MQTT_3_1_MAX_CLIENT_ID_LENGTH | 1024 | Max ClientId length for 3.1 version of protocol |
mqtt.handler.all_msg_callback_threads | MQTT_HANDLER_ALL_MSG_CALLBACK_THREADS | 2 | Number of threads in thread pool for processing all publish msgs callbacks after sending them to Kafka |
mqtt.handler.device_msg_callback_threads | MQTT_HANDLER_DEVICE_MSG_CALLBACK_THREADS | 2 | Number of threads in thread pool for processing device persisted publish msgs callbacks after sending them to Kafka |
mqtt.handler.app_msg_callback_threads | MQTT_HANDLER_APP_MSG_CALLBACK_THREADS | 2 | Number of threads in thread pool for processing application persisted publish msgs callbacks after sending them to Kafka |
MQTT Persistence parameters | |||
mqtt.persistent-session.device.persisted-messages.limit | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_LIMIT | 1000 | Maximum number of PUBLISH messages stored for each persisted DEVICE client |
mqtt.persistent-session.device.persisted-messages.ttl | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_TTL | 604800 | TTL of persisted DEVICE messages in seconds. The current value corresponds to one week |
mqtt.persistent-session.device.persisted-messages.clean-up.cron | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_CLEAN_UP_CRON | 0 0 2 * * * | Cron job to schedule clearing of outdated persisted DEVICE messages. Defaults to 'every day at 2 o'clock' |
mqtt.persistent-session.device.persisted-messages.clean-up.zone | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_CLEAN_UP_ZONE | UTC | Timezone for the DEVICE messages clearing cron-job |
mqtt.persistent-session.device.persisted-messages.clean-up.session-ctx-page-size | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_CLEAN_UP_SESSION_CTX_PAGE_SIZE | 1000 | Max number of ClientSessionCtx in one SELECT request |
mqtt.persistent-session.device.persisted-messages.sql.update-packet-queue.batch-threads | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_UPDATE_PACKET_QUEUE_BATCH_THREADS | 1 | Number of parallel threads that process UpdatePacketQueue |
mqtt.persistent-session.device.persisted-messages.sql.update-packet-queue.batch-size | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_UPDATE_PACKET_QUEUE_BATCH_SIZE | 100 | Batch size for processing packet updates |
mqtt.persistent-session.device.persisted-messages.sql.update-packet-queue.max-delay | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_UPDATE_PACKET_QUEUE_MAX_DELAY | 50 | Max timeout for packet updates queue polling. Value set in milliseconds |
mqtt.persistent-session.device.persisted-messages.sql.delete-packet-queue.batch-threads | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_DELETE_PACKET_QUEUE_BATCH_THREADS | 1 | Number of parallel threads that process DeletePacketQueue |
mqtt.persistent-session.device.persisted-messages.sql.delete-packet-queue.batch-size | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_DELETE_PACKET_QUEUE_BATCH_SIZE | 100 | Batch size for processing packet deletes |
mqtt.persistent-session.device.persisted-messages.sql.delete-packet-queue.max-delay | MQTT_PERSISTENT_SESSION_DEVICE_PERSISTED_MESSAGES_SQL_DELETE_PACKET_QUEUE_MAX_DELAY | 50 | Max timeout for packet deletes queue polling. Value set in milliseconds |
Rate Limits parameters | |||
mqtt.rate-limits.enabled | MQTT_RATE_LIMITS_ENABLED | false | Enable/disable publish rate limits per client |
mqtt.rate-limits.client-config | MQTT_RATE_LIMITS_CLIENT_CONFIG | 10:1,300:60 | Limit the maximum publish msgs per client on each server for specified time intervals in seconds. Comma separated list of limit:seconds pairs |
Spring JPA datasource parameters | |||
spring.jpa.database-platform | SPRING_JPA_DATABASE_PLATFORM | org.hibernate.dialect.PostgreSQLDialect | Database SQL dialect for Spring JPA |
spring.datasource.driverClassName | SPRING_DRIVER_CLASS_NAME | org.postgresql.Driver | Database driver for Spring JPA |
spring.datasource.url | SPRING_DATASOURCE_URL | jdbc:postgresql://localhost:5432/thingsboard_mqtt_broker | Database URL |
spring.datasource.username | SPRING_DATASOURCE_USERNAME | postgres | Database Username |
spring.datasource.password | SPRING_DATASOURCE_PASSWORD | postgres | Database password |
spring.datasource.hikari.maximumPoolSize | SPRING_DATASOURCE_MAXIMUM_POOL_SIZE | 16 | This property allows the number of connections in the pool to increase 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 |
spring.datasource.hikari.maxLifetime | SPRING_DATASOURCE_MAX_LIFETIME | 600000 | This property controls the max lifetime in milliseconds of a connection. Only when it is closed will it then be removed |
SQL configuration parameters | |||
database.ts_max_intervals | DATABASE_TS_MAX_INTERVALS | 700 | Max number of DB queries generated by single API call to fetch telemetry records |
sql.batch_sort | SQL_BATCH_SORT | true | Specify whether to sort entities before batch update. Should be enabled for cluster mode to avoid deadlocks |
sql.ts_key_value_partitioning | SQL_TS_KV_PARTITIONING | DAYS | Specify partitioning size for timestamp key-value storage. Example: DAYS, MONTHS, YEARS, INDEFINITE |
sql.ts.batch_size | SQL_TS_BATCH_SIZE | 10000 | Batch size for persisting time-series inserts |
sql.ts.batch_max_delay | SQL_TS_BATCH_MAX_DELAY_MS | 100 | Max timeout for time-series entries queue polling. Value set in milliseconds |
sql.ts.batch_threads | SQL_TS_BATCH_THREADS | 3 | Number of threads that execute batch insert/update statements for time-series data |
sql.ttl.ts.enabled | SQL_TTL_TS_ENABLED | true | The parameter to specify whether to use TTL (Time To Live) for time-series records |
sql.ttl.ts.execution_interval_ms | SQL_TTL_TS_EXECUTION_INTERVAL_MS | 86400000 | The parameter to specify the period of execution TTL task for time-series records. Value set in milliseconds. Default value corresponds to one day |
sql.ttl.ts.ts_key_value_ttl | SQL_TTL_TS_KEY_VALUE_TTL | 604800 | The parameter to specify system TTL(Time To Live) value for time-series records. Value set in seconds. 0 - records are never expired. Default value corresponds to seven days |
db.connection-check-rate-ms | DB_CONNECTION_CHECK_RATE_MS | 10000 | The parameter to specify time interval in milliseconds to periodically check if the connection to the DB is still established |
Default Kafka parameters | |||
queue.kafka.bootstrap.servers | TB_KAFKA_SERVERS | localhost:9092 | List of kafka bootstrap servers used to establish connection |
queue.kafka.enable-topic-deletion | TB_KAFKA_ENABLE_TOPIC_DELETION | true | Enable/disable deletion of topics for Application MQTT Clients |
queue.kafka.default.producer.acks | TB_KAFKA_DEFAULT_PRODUCER_ACKS | 1 | The number of acknowledgments the producer requires the leader to have received before considering a request complete |
queue.kafka.default.producer.retries | TB_KAFKA_DEFAULT_PRODUCER_RETRIES | 1 | Setting a value greater than zero will cause the client to resend any record whose send fails with a potentially transient error |
queue.kafka.default.producer.batch-size | TB_KAFKA_DEFAULT_PRODUCER_BATCH_SIZE | 16384 | The producer will attempt to batch records together into fewer requests whenever multiple records are being sent to the same partition. Size in bytes |
queue.kafka.default.producer.linger-ms | TB_KAFKA_DEFAULT_PRODUCER_LINGER_MS | 5 | The producer groups together any records that arrive in between request transmissions into a single batched request, set in milliseconds |
queue.kafka.default.producer.buffer-memory | TB_KAFKA_DEFAULT_PRODUCER_BUFFER_MEMORY | 33554432 | The total bytes of memory the producer can use to buffer records waiting to be sent to the server |
queue.kafka.default.producer.compression-type | TB_KAFKA_DEFAULT_COMPRESSION_TYPE | none | The compression type for all data generated by the producer. Valid values are `none`, `gzip`, `snappy`, `lz4`, or `zstd` |
queue.kafka.default.consumer.partition-assignment-strategy | TB_KAFKA_DEFAULT_CONSUMER_PARTITION_ASSIGNMENT_STRATEGY | org.apache.kafka.clients.consumer.StickyAssignor | A list of class names or class types, ordered by preference, of supported partition assignment strategies that the client will use to distribute partition ownership amongst consumer instances when group management is used |
queue.kafka.default.consumer.session-timeout-ms | TB_KAFKA_DEFAULT_CONSUMER_SESSION_TIMEOUT_MS | 300000 | The timeout in milliseconds used to detect client failures when using Kafka's group management facility |
queue.kafka.default.consumer.max-poll-interval-ms | TB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_INTERVAL_MS | 300000 | The maximum delay in milliseconds between invocations of poll() when using consumer group management |
queue.kafka.default.consumer.max-poll-records | TB_KAFKA_DEFAULT_CONSUMER_MAX_POLL_RECORDS | 8192 | The maximum number of records returned in a single call to poll() |
queue.kafka.default.consumer.max-partition-fetch-bytes | TB_KAFKA_DEFAULT_CONSUMER_MAX_PARTITION_FETCH_BYTES | 16777216 | The maximum amount of data in bytes per-partition the server will return |
queue.kafka.default.consumer.fetch-max-bytes | TB_KAFKA_DEFAULT_CONSUMER_FETCH_MAX_BYTES | 134217728 | The maximum amount of data in bytes the server should return for a fetch request |
Custom Kafka parameters | |||
queue.kafka.msg-all.topic | TB_KAFKA_MSG_ALL_TOPIC | tbmq.msg.all | Topic for persisting incoming PUBLISH messages |
queue.kafka.msg-all.topic-properties | TB_KAFKA_MSG_ALL_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:2147483648;partitions:24;replication.factor:1 | Kafka topic properties for "msg-all" topic |
queue.kafka.msg-all.additional-consumer-config | TB_KAFKA_MSG_ALL_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "msg-all" topic | |
queue.kafka.msg-all.additional-producer-config | TB_KAFKA_MSG_ALL_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "msg-all" topic | |
queue.kafka.application-persisted-msg.topic-properties | TB_KAFKA_APP_PERSISTED_MSG_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 | Kafka topic properties for "application-persisted-msg" topics |
queue.kafka.application-persisted-msg.additional-consumer-config | TB_KAFKA_APP_PERSISTED_MSG_ADDITIONAL_CONSUMER_CONFIG | max.poll.records:512 | Additional Kafka consumer configs for "application-persisted-msg" topics |
queue.kafka.application-persisted-msg.additional-producer-config | TB_KAFKA_APP_PERSISTED_MSG_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "application-persisted-msg" topics | |
queue.kafka.application-persisted-msg.shared-topic.topic-properties | TB_KAFKA_APP_PERSISTED_MSG_SHARED_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;replication.factor:1 | Kafka topic properties for application shared subscription topics |
queue.kafka.application-persisted-msg.shared-topic.additional-consumer-config | TB_KAFKA_APP_PERSISTED_MSG_SHARED_ADDITIONAL_CONSUMER_CONFIG | max.poll.records:512 | Additional Kafka consumer configs for application shared subscription topics |
queue.kafka.application-persisted-msg.shared-topic.additional-producer-config | TB_KAFKA_APP_PERSISTED_MSG_SHARED_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for application shared subscription topics | |
queue.kafka.device-persisted-msg.topic | TB_KAFKA_DEVICE_PERSISTED_MSG_TOPIC | tbmq.msg.persisted | Topic for persisting Device messages before saving them in Database |
queue.kafka.device-persisted-msg.topic-properties | TB_KAFKA_DEVICE_PERSISTED_MSG_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 | Kafka topic properties for "device-persisted-msg" topic |
queue.kafka.device-persisted-msg.additional-consumer-config | TB_KAFKA_DEVICE_PERSISTED_MSG_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "device-persisted-msg" topic | |
queue.kafka.device-persisted-msg.additional-producer-config | TB_KAFKA_DEVICE_PERSISTED_MSG_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "device-persisted-msg" topic | |
queue.kafka.retained-msg.topic | TB_KAFKA_RETAINED_MSG_TOPIC | tbmq.msg.retained | Topic for retained messages |
queue.kafka.retained-msg.topic-properties | TB_KAFKA_RETAINED_MSG_TOPIC_PROPERTIES | segment.bytes:26214400;partitions:1;replication.factor:1 | Kafka topic properties for "retained_msg" topic |
queue.kafka.retained-msg.additional-consumer-config | TB_KAFKA_RETAINED_MSG_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "retained_msg" topic | |
queue.kafka.retained-msg.additional-producer-config | TB_KAFKA_RETAINED_MSG_ADDITIONAL_PRODUCER_CONFIG | retries:3 | Additional Kafka producer configs for "retained_msg" topic |
queue.kafka.client-session.topic | TB_KAFKA_CLIENT_SESSION_TOPIC | tbmq.client.session | Topic for persisting Client Sessions |
queue.kafka.client-session.topic-properties | TB_KAFKA_CLIENT_SESSION_TOPIC_PROPERTIES | segment.bytes:26214400;partitions:1;replication.factor:1 | Kafka topic properties for "client-session" topic |
queue.kafka.client-session.additional-consumer-config | TB_KAFKA_CLIENT_SESSION_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "client-session" topic | |
queue.kafka.client-session.additional-producer-config | TB_KAFKA_CLIENT_SESSION_ADDITIONAL_PRODUCER_CONFIG | retries:3 | Additional Kafka producer configs for "client-session" topic |
queue.kafka.client-subscriptions.topic | TB_KAFKA_CLIENT_SUBSCRIPTIONS_TOPIC | tbmq.client.subscriptions | Topic for persisting Client Subscriptions |
queue.kafka.client-subscriptions.topic-properties | TB_KAFKA_CLIENT_SUBSCRIPTIONS_TOPIC_PROPERTIES | segment.bytes:26214400;partitions:1;replication.factor:1 | Kafka topic properties for "client-subscriptions" topic |
queue.kafka.client-subscriptions.additional-consumer-config | TB_KAFKA_CLIENT_SUBSCRIPTIONS_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "client-subscriptions" topic | |
queue.kafka.client-subscriptions.additional-producer-config | TB_KAFKA_CLIENT_SUBSCRIPTIONS_ADDITIONAL_PRODUCER_CONFIG | retries:3 | Additional Kafka producer configs for "client-subscriptions" topic |
queue.kafka.client-session-event.topic | TB_KAFKA_CLIENT_SESSION_EVENT_TOPIC | tbmq.client.session.event.request | Topic for sending Client Session Event requests |
queue.kafka.client-session-event.topic-properties | TB_KAFKA_CLIENT_SESSION_EVENT_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:48;replication.factor:1 | Kafka topic properties for "client-session-event" topic |
queue.kafka.client-session-event.additional-consumer-config | TB_KAFKA_CLIENT_SESSION_EVENT_ADDITIONAL_CONSUMER_CONFIG | max.poll.records:1024 | Additional Kafka consumer configs for "client-session-event" topic |
queue.kafka.client-session-event.additional-producer-config | TB_KAFKA_CLIENT_SESSION_EVENT_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "client-session-event" topic | |
queue.kafka.client-session-event-response.topic-prefix | TB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_TOPIC_PREFIX | tbmq.client.session.event.response | Prefix for topics for sending Client Session Event Responses to Broker nodes |
queue.kafka.client-session-event-response.topic-properties | TB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 | Kafka topic properties for "client-session-event-response" topics |
queue.kafka.client-session-event-response.additional-consumer-config | TB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "client-session-event-response" topics | |
queue.kafka.client-session-event-response.additional-producer-config | TB_KAFKA_CLIENT_SESSION_EVENT_RESPONSE_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "client-session-event-response" topics | |
queue.kafka.disconnect-client-command.topic-prefix | TB_KAFKA_DISCONNECT_CLIENT_COMMAND_TOPIC_PREFIX | tbmq.client.disconnect | Prefix for topics for sending Disconnect Client Commands to Broker nodes |
queue.kafka.disconnect-client-command.topic-properties | TB_KAFKA_DISCONNECT_CLIENT_COMMAND_RESPONSE_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 | Kafka topic properties for "disconnect-client-command" topics |
queue.kafka.disconnect-client-command.additional-consumer-config | TB_KAFKA_DISCONNECT_CLIENT_COMMAND_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "disconnect-client-command" topics | |
queue.kafka.disconnect-client-command.additional-producer-config | TB_KAFKA_DISCONNECT_CLIENT_COMMAND_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "disconnect-client-command" topics | |
queue.kafka.basic-downlink-msg.topic-prefix | TB_KAFKA_BASIC_DOWNLINK_MSG_TOPIC_PREFIX | tbmq.msg.downlink.basic | Prefix for topics for persisting non-persistent Device messages that should be transferred to other Broker nodes |
queue.kafka.basic-downlink-msg.topic-properties | TB_KAFKA_BASIC_DOWNLINK_MSG_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 | Kafka topic properties for "basic-downlink-msg" topics |
queue.kafka.basic-downlink-msg.additional-consumer-config | TB_KAFKA_BASIC_DOWNLINK_MSG_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "basic-downlink-msg" topics | |
queue.kafka.basic-downlink-msg.additional-producer-config | TB_KAFKA_BASIC_DOWNLINK_MSG_ADDITIONAL_PRODUCER_CONFIG | batch.size:32768 | Additional Kafka producer configs for "basic-downlink-msg" topics |
queue.kafka.persisted-downlink-msg.topic-prefix | TB_KAFKA_PERSISTED_DOWNLINK_MSG_TOPIC_PREFIX | tbmq.msg.downlink.persisted | Prefix for topics for persisting persistent Device messages that should be transferred to other Broker nodes |
queue.kafka.persisted-downlink-msg.topic-properties | TB_KAFKA_PERSISTED_DOWNLINK_MSG_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:12;replication.factor:1 | Kafka topic properties for "persisted-downlink-msg" topics |
queue.kafka.persisted-downlink-msg.additional-consumer-config | TB_KAFKA_PERSISTED_DOWNLINK_MSG_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "persisted-downlink-msg" topics | |
queue.kafka.persisted-downlink-msg.additional-producer-config | TB_KAFKA_PERSISTED_DOWNLINK_MSG_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "persisted-downlink-msg" topics | |
queue.kafka.application-removed-event.topic | TB_KAFKA_APPLICATION_REMOVED_EVENT_TOPIC | tbmq.sys.app.removed | Topic for sending events to remove application topics when application clients are changed to be device clients |
queue.kafka.application-removed-event.topic-properties | TB_KAFKA_APPLICATION_REMOVED_EVENT_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 | Kafka topic properties for "application-removed-event" topic |
queue.kafka.application-removed-event.additional-consumer-config | TB_KAFKA_APPLICATION_REMOVED_EVENT_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "application-removed-event" topic | |
queue.kafka.application-removed-event.additional-producer-config | TB_KAFKA_APPLICATION_REMOVED_EVENT_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "application-removed-event" topic | |
queue.kafka.historical-data-total.topic | TB_KAFKA_HISTORICAL_DATA_TOTAL_TOPIC | tbmq.sys.historical.data | Topic for sending historical data stats to be summed from each broker |
queue.kafka.historical-data-total.topic-properties | TB_KAFKA_HISTORICAL_DATA_TOTAL_TOPIC_PROPERTIES | retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;replication.factor:1 | Kafka topic properties for "historical-data-total" topic |
queue.kafka.historical-data-total.additional-consumer-config | TB_KAFKA_HISTORICAL_DATA_TOTAL_ADDITIONAL_CONSUMER_CONFIG | Additional Kafka consumer configs for "historical-data-total" topic | |
queue.kafka.historical-data-total.additional-producer-config | TB_KAFKA_HISTORICAL_DATA_TOTAL_ADDITIONAL_PRODUCER_CONFIG | Additional Kafka producer configs for "historical-data-total" topic | |
queue.kafka.admin.config | TB_KAFKA_ADMIN_CONFIG | retries:1 | List of configs separated by semicolon used for admin kafka client creation |
queue.kafka.consumer-stats.enabled | TB_KAFKA_CONSUMER_STATS_ENABLED | true | Prints lag if enabled between consumer group offset and last messages offset in Kafka topics |
queue.kafka.consumer-stats.print-interval-ms | TB_KAFKA_CONSUMER_STATS_PRINT_INTERVAL_MS | 60000 | Statistics printing interval in milliseconds for Kafka's consumer-groups stats |
queue.kafka.consumer-stats.kafka-response-timeout-ms | TB_KAFKA_CONSUMER_STATS_RESPONSE_TIMEOUT_MS | 1000 | Time to wait in milliseconds for the stats-loading requests to Kafka to finish |
queue.kafka.consumer-stats.consumer-config | TB_KAFKA_CONSUMER_STATS_CONSUMER_CONFIG | List of configs separated by semicolon used for kafka stats consumer | |
queue.kafka.home-page.consumer-config | TB_KAFKA_HOME_PAGE_CONSUMER_CONFIG | List of configs separated by semicolon used for kafka admin client for home page | |
queue.kafka.home-page.kafka-response-timeout-ms | TB_KAFKA_HOME_PAGE_RESPONSE_TIMEOUT_MS | 1000 | Time to wait in milliseconds for the home page requests to Kafka to finish |
Kafka queue processing parameters | |||
queue.msg-all.consumers-count | TB_MSG_ALL_CONSUMERS_COUNT | 4 | Number of parallel PUBLISH messages consumers |
queue.msg-all.threads-count | TB_MSG_ALL_THREADS_COUNT | 4 | Number of threads in the pool to process consumers tasks |
queue.msg-all.poll-interval | TB_MSG_ALL_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'msg-all' topic |
queue.msg-all.pack-processing-timeout | TB_MSG_ALL_PACK_PROCESSING_TIMEOUT | 10000 | Timeout in milliseconds for processing a 'msg-all' pack |
queue.msg-all.ack-strategy.type | TB_MSG_ALL_ACK_STRATEGY_TYPE | SKIP_ALL | 'msg-all' queue processing strategy. Can be: SKIP_ALL, RETRY_ALL |
queue.msg-all.ack-strategy.retries | TB_MSG_ALL_ACK_STRATEGY_RETRIES | 1 | Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy |
queue.msg-all.msg-parallel-processing | TB_MSG_ALL_PARALLEL_PROCESSING | false | Enable/disable processing of consumed messages in parallel (grouped by publishing client id to preserve order) |
queue.application-persisted-msg.threads-count | TB_APP_PERSISTED_MSG_THREADS_COUNT | 8 | Number of threads in the pool to process Application consumers tasks |
queue.application-persisted-msg.poll-interval | TB_APP_PERSISTED_MSG_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'application-persisted-msg' topic |
queue.application-persisted-msg.pack-processing-timeout | TB_APP_PERSISTED_MSG_PACK_PROCESSING_TIMEOUT | 2000 | Timeout in milliseconds for processing an 'application-persisted-msg' pack |
queue.application-persisted-msg.ack-strategy.type | TB_APP_PERSISTED_MSG_ACK_STRATEGY_TYPE | SKIP_ALL | 'application-persisted-msg' queue processing strategy. Can be: SKIP_ALL, RETRY_ALL |
queue.application-persisted-msg.ack-strategy.retries | TB_APP_PERSISTED_MSG_ACK_STRATEGY_RETRIES | 1 | Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy |
queue.application-persisted-msg.client-id-validation | TB_APP_PERSISTED_MSG_CLIENT_ID_VALIDATION | true | Enable/disable check that Application client id contains only alphanumeric chars for Kafka topic creation |
queue.application-persisted-msg.shared-topic-validation | TB_APP_PERSISTED_MSG_SHARED_TOPIC_VALIDATION | true | Enable/disable check that Application shared subscription topic filter contains only alphanumeric chars or '+' or '#' for Kafka topic creation |
queue.application-persisted-msg.shared-subs-threads-count | TB_APP_PERSISTED_MSG_SHARED_SUBS_THREADS_COUNT | 16 | Number of threads in the pool to process Application shared subscriptions consumers tasks |
queue.device-persisted-msg.threads-count | TB_DEVICE_PERSISTED_MSG_THREADS_COUNT | 2 | Number of threads in the pool to process Device consumers tasks |
queue.device-persisted-msg.consumers-count | TB_DEVICE_PERSISTED_MSG_CONSUMERS_COUNT | 2 | Number of parallel persistent Device messages consumers |
queue.device-persisted-msg.poll-interval | TB_DEVICE_PERSISTED_MSG_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'device-persisted-msg' topic |
queue.device-persisted-msg.ack-strategy.type | TB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_TYPE | RETRY_ALL | 'device-persisted-msg' queue processing strategy. Can be: SKIP_ALL, RETRY_ALL |
queue.device-persisted-msg.ack-strategy.retries | TB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_RETRIES | 3 | Number of retries, 0 is unlimited. Use for RETRY_ALL processing strategy |
queue.device-persisted-msg.ack-strategy.pause-between-retries | TB_DEVICE_PERSISTED_MSG_ACK_STRATEGY_PAUSE_BETWEEN_RETRIES | 3 | Time in seconds to wait in consumer thread before retries |
queue.retained-msg.poll-interval | TB_RETAINED_MSG_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'retained-msg' topic |
queue.retained-msg.acknowledge-wait-timeout-ms | TB_RETAINED_MSG_ACK_WAIT_TIMEOUT_MS | 500 | Interval in milliseconds to wait for system messages to be delivered to 'retained-msg' topic |
queue.client-session.poll-interval | TB_CLIENT_SESSION_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'client-session' topic |
queue.client-session.acknowledge-wait-timeout-ms | TB_CLIENT_SESSION_ACK_WAIT_TIMEOUT_MS | 500 | Interval in milliseconds to wait for system messages to be delivered to 'client-session' topic |
queue.client-subscriptions.poll-interval | TB_CLIENT_SUBSCRIPTIONS_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'client-subscriptions' topic |
queue.client-subscriptions.acknowledge-wait-timeout-ms | TB_CLIENT_SUBSCRIPTIONS_ACK_WAIT_TIMEOUT_MS | 500 | Interval in milliseconds to wait for system messages to be delivered to 'client-subscriptions' topic |
queue.client-session-event.consumers-count | TB_CLIENT_SESSION_EVENT_CONSUMERS_COUNT | 2 | Number of parallel Client Session Event consumers |
queue.client-session-event.max-pending-requests | TB_CLIENT_SESSION_EVENT_MAX_PENDING_REQUESTS | 10000 | Number of pending Client Session Events/Requests |
queue.client-session-event.poll-interval | TB_CLIENT_SESSION_EVENT_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'client-session-event' topic |
queue.client-session-event.batch-wait-timeout-ms | TB_CLIENT_SESSION_EVENT_BATCH_WAIT_MS | 2000 | Max interval in milliseconds to process 'client-session-event' messages when consuming |
queue.client-session-event-response.response-sender-threads | TB_CLIENT_SESSION_EVENT_RESPONSE_SENDER_THREADS | 8 | Number of threads for sending Event responses |
queue.client-session-event-response.poll-interval | TB_CLIENT_SESSION_EVENT_RESPONSE_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'client-session-event-response' topics |
queue.client-session-event-response.max-request-timeout | TB_CLIENT_SESSION_EVENT_RESPONSE_MAX_REQUEST_TIMEOUT | 100000 | Time for Client Session Events to expire in milliseconds |
queue.client-session-event-response.cleanup-interval | TB_CLIENT_SESSION_EVENT_RESPONSE_CLEANUP_INTERVAL | 100 | Period in milliseconds to clean-up stale Client Session Events |
queue.disconnect-client-command.poll-interval | TB_DISCONNECT_CLIENT_COMMAND_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'disconnect-client-command' topics |
queue.persisted-downlink-msg.threads-count | TB_PERSISTED_DOWNLINK_MSG_THREADS_COUNT | 2 | Number of threads in the pool to process consumers tasks |
queue.persisted-downlink-msg.consumers-count | TB_PERSISTED_DOWNLINK_MSG_CONSUMERS_COUNT | 2 | Number of parallel persistent downlink messages consumers |
queue.persisted-downlink-msg.poll-interval | TB_PERSISTED_DOWNLINK_MSG_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'persisted-downlink-msg' topics |
queue.basic-downlink-msg.threads-count | TB_BASIC_DOWNLINK_MSG_THREADS_COUNT | 2 | Number of threads in the pool to process consumers tasks |
queue.basic-downlink-msg.consumers-count | TB_BASIC_DOWNLINK_MSG_CONSUMERS_COUNT | 2 | Number of parallel basic downlink messages consumers |
queue.basic-downlink-msg.poll-interval | TB_BASIC_DOWNLINK_MSG_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'basic-downlink-msg' topics |
queue.application-removed-event.poll-interval | TB_APPLICATION_REMOVED_EVENT_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'application-removed-event' topics |
queue.application-removed-event.processing.cron | TB_APPLICATION_REMOVED_EVENT_PROCESSING_CRON | 0 0 3 * * * | Cron expression to when execute the consuming and processing of messages |
queue.application-removed-event.processing.zone | TB_APPLICATION_REMOVED_EVENT_PROCESSING_ZONE | UTC | Timezone for the Application removed events processing cron-job |
queue.historical-data-total.poll-interval | TB_HISTORICAL_DATA_TOTAL_POLL_INTERVAL | 100 | Interval in milliseconds to poll messages from 'historical-data-total' topics |
TBMQ cache parameters | |||
cache.type | CACHE_TYPE | caffeine | Cache type |
cache.stats.enabled | CACHE_STATS_ENABLED | true | Enable/disable cache stats logging |
cache.stats.intervalSec | CACHE_STATS_INTERVAL_SEC | 60 | Cache stats logging interval in seconds |
caffeine.specs.packetIdAndSerialNumber.timeToLiveInMinutes | CACHE_SPECS_PACKET_ID_SERIAL_NUMBER_TTL | 1440 | packetIdAndSerialNumber cache TTL in minutes |
caffeine.specs.packetIdAndSerialNumber.maxSize | CACHE_SPECS_PACKET_ID_SERIAL_NUMBER_MAX_SIZE | 10000 | packetIdAndSerialNumber cache max size. maxSize: 0 means the cache is disabled |
caffeine.specs.mqttClientCredentials.timeToLiveInMinutes | CACHE_SPECS_MQTT_CLIENT_CREDENTIALS_TTL | 1440 | mqttClientCredentials cache TTL in minutes |
caffeine.specs.mqttClientCredentials.maxSize | CACHE_SPECS_MQTT_CLIENT_CREDENTIALS_MAX_SIZE | 0 | mqttClientCredentials cache max size. maxSize: 0 means the cache is disabled |
caffeine.specs.basicCredentialsPassword.timeToLiveInMinutes | CACHE_SPECS_BASIC_CREDENTIALS_PASSWORD_TTL | 1 | basicCredentialsPassword cache TTL in minutes |
caffeine.specs.basicCredentialsPassword.maxSize | CACHE_SPECS_BASIC_CREDENTIALS_PASSWORD_MAX_SIZE | 0 | basicCredentialsPassword cache max size. maxSize: 0 means the cache is disabled |
TBMQ service parameters | |||
service.id | TB_SERVICE_ID | Unique id for this service (autogenerated if empty) | |
Statistics parameters | |||
stats.enabled | STATS_ENABLED | true | Enable/disable stats printing to the logs |
stats.print-interval-ms | STATS_PRINT_INTERVAL_MS | 60000 | Period in milliseconds to print stats. Default value corresponds to 1 minute |
stats.application-processor.enabled | APPLICATION_PROCESSOR_STATS_ENABLED | true | Enable/disable specific Application clients stats |
Historical data statistics parameters | |||
historical-data-report.enabled | HISTORICAL_DATA_REPORT_ENABLED | true | Enable/disable historical data stats reporting and persistence to the time-series |
historical-data-report.interval | HISTORICAL_DATA_REPORT_INTERVAL | 1 | Period in minutes to collect stats for each broker |
historical-data-report.zone | HISTORICAL_DATA_REPORT_ZONE | UTC | Timezone for the historical data stats processing |
TBMQ statistics and troubleshooting | |||
management.endpoints.web.exposure.include | METRICS_ENDPOINTS_EXPOSE | prometheus | Expose metrics endpoint (use value 'info' to disable prometheus metrics) |
analysis.log.analyzed-client-ids | ANALYSIS_LOG_CLIENT_IDS | List of ClientIds separated with comas. Events for those clients will be logged | |
The default timeout for asynchronous requests | |||
spring.mvc.async.request-timeout | SPRING_MVC_ASYNC_REQUEST_TIMEOUT | 30000 | Timeout for HTTP requests in milliseconds |
Spring MVC/Resources parameters | |||
spring.mvc.cors.mappings.[/api/**].allowed-origin-patterns | MVC_CORS_API_ALLOWED_ORIGIN_PATTERNS | * | Comma-separated list of origins to allow. '*' allows all origins. When not set, CORS support is disabled |
spring.mvc.cors.mappings.[/api/**].allowed-methods | MVC_CORS_API_ALLOWED_METHODS | * | Comma-separated list of methods to allow. '*' allows all methods |
spring.mvc.cors.mappings.[/api/**].allowed-headers | MVC_CORS_API_ALLOWED_HEADERS | * | Comma-separated list of headers to allow in a request. '*' allows all headers |
spring.mvc.cors.mappings.[/api/**].max-age | MVC_CORS_API_MAX_AGE | 1800 | How long, in seconds, the response from a pre-flight request can be cached by clients |
spring.mvc.cors.mappings.[/api/**].allow-credentials | MVC_CORS_API_ALLOW_CREDENTIALS | true | Set whether credentials are supported. When not set, credentials are not supported |
Swagger parameters | |||
swagger.api_path_regex | SWAGGER_API_PATH_REGEX | /api/.* | General swagger parameters |
swagger.security_path_regex | SWAGGER_SECURITY_PATH_REGEX | /api/.* | General swagger parameters |
swagger.non_security_path_regex | SWAGGER_NON_SECURITY_PATH_REGEX | /api/noauth.* | General swagger parameters |
swagger.title | SWAGGER_TITLE | TBMQ REST API | The title on the API doc UI page |
swagger.description | SWAGGER_DESCRIPTION | TBMQ open-source REST API documentation | The description on the API doc UI page |
swagger.contact.name | SWAGGER_CONTACT_NAME | ThingsBoard team | The contact name on the API doc UI page |
swagger.contact.url | SWAGGER_CONTACT_URL | https://thingsboard.io | The contact URL on the API doc UI page |
swagger.contact.email | SWAGGER_CONTACT_EMAIL | [email protected] | The contact email on the API doc UI page |
swagger.license.title | SWAGGER_LICENSE_TITLE | Apache License Version 2.0 | The license title on the API doc UI page |
swagger.license.url | SWAGGER_LICENSE_URL | https://github.com/thingsboard/tbmq/blob/main/LICENSE | Link to the license body on the API doc UI page |
swagger.version | SWAGGER_VERSION | The version of the API doc to display. Default to the package version |
logback.xml
The configuration file for logging is logback.xml. It allows for controlling the log level, the size of log files, and the total size/volume of logs.