Skip to content
Stand with Ukraine flag

MQTT Transport Configuration

WEB_APPLICATION_ENABLE · Default false

If you enabled process metrics you should also enable ‘web-environment’.

WEB_APPLICATION_TYPE · Default none

If you enabled process metrics you should set ‘web-application-type’ to ‘servlet’ value.

HTTP_BIND_ADDRESS · Default 0.0.0.0

Server bind address (has no effect if web-environment is disabled).

HTTP_BIND_PORT · Default 8083

Server bind port (has no effect if web-environment is disabled).

ZooKeeper connection parameters. Used for service discovery.

Section titled “ZooKeeper connection parameters. Used for service discovery.”

ZOOKEEPER_ENABLED · Default false

Enable/disable ZooKeeper discovery service.

ZOOKEEPER_URL · Default localhost:2181

ZooKeeper connect string

ZOOKEEPER_RETRY_INTERVAL_MS · Default 3000

ZooKeeper retry interval in milliseconds

ZOOKEEPER_CONNECTION_TIMEOUT_MS · Default 3000

ZooKeeper connection timeout in milliseconds

ZOOKEEPER_SESSION_TIMEOUT_MS · Default 3000

ZooKeeper session timeout in milliseconds

ZOOKEEPER_NODES_DIR · Default /thingsboard

Name of the directory in ZooKeeper ‘filesystem’

ZOOKEEPER_RECALCULATE_DELAY_MS · Default 0

The recalculate_delay property is recommended in a microservices architecture setup for rule-engine services. 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. 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.

CACHE_TYPE · Default redis

caffeine or redis

CACHE_SPECS_ENTITY_LIMITS_TTL · Default 5

Entity limits cache TTL

CACHE_SPECS_ENTITY_LIMITS_MAX_SIZE · Default 100000

0 means the cache is disabled

REDIS_CONNECTION_TYPE · Default standalone

Redis deployment type: Standalone (single Redis node deployment) OR Cluster

REDIS_HOST · Default localhost

Redis connection host

REDIS_PORT · Default 6379

Redis connection port

REDIS_USE_DEFAULT_CLIENT_CONFIG · Default true

Use default Redis configuration file

REDIS_CLIENT_NAME · Default standalone

this value may be used only if you used not default ClientConfig

REDIS_CLIENT_CONNECT_TIMEOUT · Default 30000

this value may be used only if you used not default ClientConfig

REDIS_CLIENT_READ_TIMEOUT · Default 60000

this value may be used only if you used not default ClientConfig

REDIS_CLIENT_USE_POOL_CONFIG · Default false

this value may be used only if you used not default ClientConfig

REDIS_NODES

Comma-separated list of “host:port” pairs to bootstrap from.

REDIS_MAX_REDIRECTS · Default 12

Maximum number of redirects to follow when executing commands across the cluster.

REDIS_USE_DEFAULT_POOL_CONFIG · Default true

if set false will be used pool config build from values of the pool config section

REDIS_MASTER

name of master node

REDIS_SENTINELS

comma-separated list of “host:port” pairs of sentinels

REDIS_SENTINEL_PASSWORD

password to authenticate with sentinel

REDIS_USE_DEFAULT_POOL_CONFIG · Default true

if set false will be used pool config build from values of the pool config section

REDIS_DB · Default 0

Redis logical database index to select after connecting.

REDIS_PASSWORD

Password for Redis authentication (leave empty if not required).

REDIS_USERNAME

Redis username for ACL authentication (Redis 6.0+). Leave empty for legacy password-only auth

TB_REDIS_SSL_ENABLED · Default false

Enable/disable secure connection

TB_REDIS_SSL_PEM_CERT

Path redis server (CA) certificate

TB_REDIS_SSL_PEM_KEY

Path to user certificate file. This is optional for the client and can be used for two-way authentication for the client

TB_REDIS_SSL_PEM_KEY_PASSWORD

Path to user private key file. This is optional for the client and only needed if ‘user_cert_file’ is configured.

REDIS_POOL_CONFIG_MAX_TOTAL · Default 128

Maximum number of connections that can be allocated by the connection pool

REDIS_POOL_CONFIG_MAX_IDLE · Default 128

Maximum number of idle connections that can be maintained in the pool without being closed

REDIS_POOL_CONFIG_MIN_IDLE · Default 16

Minumum number of idle connections that can be maintained in the pool without being closed

REDIS_POOL_CONFIG_TEST_ON_BORROW · Default false

Enable/Disable PING command send when a connection is borrowed

REDIS_POOL_CONFIG_TEST_ON_RETURN · Default false

The property is used to specify whether to test the connection before returning it to the connection pool.

REDIS_POOL_CONFIG_TEST_WHILE_IDLE · Default true

The property is used in the context of connection pooling in Redis

REDIS_POOL_CONFIG_MIN_EVICTABLE_MS · Default 60000

Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds

REDIS_POOL_CONFIG_EVICTION_RUNS_MS · Default 30000

Specifies the time interval in milliseconds between two consecutive eviction runs

REDIS_POOL_CONFIG_MAX_WAIT_MS · Default 60000

Maximum time in milliseconds where a client is willing to wait for a connection from the pool when all connections are exhausted

REDIS_POOL_CONFIG_NUMBER_TESTS_PER_EVICTION_RUN · Default 3

Specifies the number of connections to test for eviction during each eviction run

REDIS_POOL_CONFIG_BLOCK_WHEN_EXHAUSTED · Default true

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

MQTT_BIND_ADDRESS · Default 0.0.0.0

MQTT bind-address

MQTT_BIND_PORT · Default 1883

MQTT bind port

MQTT_PROXY_PROTOCOL_ENABLED · Default false

Enable proxy protocol support. Disabled by default. If enabled, supports both v1 and v2. Useful to get the real IP address of the client in the logs and for rate limits.

MQTT_TIMEOUT · Default 10000

MQTT processing timeout in milliseconds

MQTT_DISCONNECT_TIMEOUT · Default 1000

MQTT disconnect timeout in milliseconds. The time to wait for the client to disconnect after the server sends a disconnect message.

MQTT_MSG_QUEUE_SIZE_PER_DEVICE_LIMIT · Default 100

messages await in the queue before device connected state. This limit works on low level before TenantProfileLimits mechanism

MQTT_GATEWAY_METRICS_REPORT_INTERVAL_SEC · Default 60

Interval of periodic report of the gateway metrics

NETTY_LEAK_DETECTOR_LVL · Default DISABLED

Netty leak detector level

NETTY_BOSS_GROUP_THREADS · Default 1

Netty BOSS threads count

NETTY_WORKER_GROUP_THREADS · Default 12

Netty worker threads count

NETTY_MAX_PAYLOAD_SIZE · Default 65536

Max payload size in bytes

NETTY_SO_KEEPALIVE · Default false

Enables TCP keepalive. This means that TCP starts sending keepalive probes when a connection is idle for some time

MQTT_SSL_ENABLED · Default false

Enable/disable SSL support

MQTT_SSL_BIND_ADDRESS · Default 0.0.0.0

MQTT SSL bind-address

MQTT_SSL_BIND_PORT · Default 8883

MQTT SSL bind port

MQTT_SSL_PROTOCOL · Default TLSv1.2

SSL protocol: See https://docs.oracle.com/en/java/javase/11/docs/specs/security/standard-names.html#sslcontext-algorithms

MQTT_SSL_CREDENTIALS_TYPE · Default PEM

Server credentials type (PEM - pem certificate file; KEYSTORE - java keystore)

MQTT_SSL_PEM_CERT · Default mqttserver.pem

Path to the server certificate file (holds server certificate or certificate chain, may include server private key)

MQTT_SSL_PEM_KEY · Default mqttserver_key.pem

Path to the server certificate private key file. Optional by default. Required if the private key is not present in server certificate file;

MQTT_SSL_PEM_KEY_PASSWORD · Default server_key_password

Server certificate private key password (optional)

MQTT_SSL_KEY_STORE_TYPE · Default JKS

Type of the key store (JKS or PKCS12)

MQTT_SSL_KEY_STORE · Default mqttserver.jks

Path to the key store that holds the SSL certificate

MQTT_SSL_KEY_STORE_PASSWORD · Default server_ks_password

Password used to access the key store

MQTT_SSL_KEY_ALIAS

Optional alias of the private key; If not set, the platform will load the first private key from the keystore;

MQTT_SSL_KEY_PASSWORD · Default server_key_password

Password used to access the key

MQTT_SSL_SKIP_VALIDITY_CHECK_FOR_CLIENT_CERT · Default false

Skip certificate validity check for client certificates.

TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT · Default 600000

Session inactivity timeout is a global configuration parameter that defines how long the device transport session will be opened after the last message arrives from the device. The parameter value is in milliseconds. The last activity time of the device session is updated if the device sends any message, including keepalive messages If there is no activity, the session will be closed, and all subscriptions will be deleted. We recommend this parameter to be in sync with device inactivity timeout (“state.defaultInactivityTimeoutInSec” or DEFAULT_INACTIVITY_TIMEOUT) parameter which is responsible for detection of the device connectivity status in the core service of the platform. The value of the session inactivity timeout parameter should be greater or equal to the device inactivity timeout. Note that the session inactivity timeout is set in milliseconds while device inactivity timeout is in seconds.

TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT · Default 3000

Interval of periodic check for expired sessions and report of the changes to session last activity time

JSON_TYPE_CAST_ENABLED · Default true

Cast String data types to Numeric if possible when processing Telemetry/Attributes JSON

JSON_MAX_STRING_VALUE_LENGTH · Default 0

Maximum allowed string value length when processing Telemetry/Attributes JSON (0 value disables string value length check)

TB_TRANSPORT_LOG_ENABLED · Default true

Enable/Disable log of transport messages to telemetry. For example, logging of LwM2M registration update

TB_TRANSPORT_LOG_MAX_LENGTH · Default 1024

Maximum length of the log message. The content will be truncated to the specified value if needed

TB_TRANSPORT_STATS_ENABLED · Default true

Enable/Disable the collection of transport statistics

TB_TRANSPORT_STATS_PRINT_INTERVAL_MS · Default 60000

Interval of transport statistics logging

CLIENT_SIDE_RPC_TIMEOUT · Default 60000

Processing timeout interval of the RPC command on the CLIENT SIDE. Time in milliseconds

TB_TRANSPORT_IP_RATE_LIMITS_ENABLED · Default false

Enable or disable generic rate limits. Device and Tenant specific rate limits are controlled in Tenant Profile.

TB_TRANSPORT_MAX_WRONG_CREDENTIALS_PER_IP · Default 10

Maximum number of connect attempts with invalid credentials

TB_TRANSPORT_IP_BLOCK_TIMEOUT · Default 60000

Timeout to expire block IP addresses

TB_QUEUE_TYPE · Default kafka

kafka (Apache Kafka)

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).

TB_KAFKA_SERVERS · Default localhost:9092

Kafka Bootstrap Servers

TB_KAFKA_SSL_ENABLED · Default false

Enable/Disable SSL Kafka communication

TB_KAFKA_SSL_TRUSTSTORE_LOCATION

The location of the trust store file

TB_KAFKA_SSL_TRUSTSTORE_PASSWORD

The password of trust store file if specified

TB_KAFKA_SSL_KEYSTORE_LOCATION

The location of the key store file. This is optional for the client and can be used for two-way authentication for the client

TB_KAFKA_SSL_KEYSTORE_PASSWORD

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

TB_KAFKA_SSL_KEY_PASSWORD

The password of the private key in the key store file or the PEM key specified in ‘keystore.key’

TB_KAFKA_ACKS · Default all

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

TB_KAFKA_RETRIES · Default 1

Number of retries. Resend any record whose send fails with a potentially transient error

TB_KAFKA_COMPRESSION_TYPE · Default none

none or gzip

TB_KAFKA_BATCH_SIZE · Default 16384

Default batch size. This setting gives the upper bound of the batch size to be sent

TB_KAFKA_LINGER_MS · Default 1

This variable creates a small amount of artificial delay—that is, rather than immediately sending out a record

TB_KAFKA_MAX_REQUEST_SIZE · Default 1048576

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

TB_KAFKA_MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION · Default 5

The maximum number of unacknowledged requests the client will send on a single connection before blocking

TB_BUFFER_MEMORY · Default 33554432

The total bytes of memory the producer can use to buffer records waiting to be sent to the server

TB_QUEUE_KAFKA_REPLICATION_FACTOR · Default 1

The multiple copies of data over the multiple brokers of Kafka

TB_QUEUE_KAFKA_MAX_POLL_INTERVAL_MS · Default 300000

The maximum delay between invocations of poll() 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

TB_QUEUE_KAFKA_MAX_POLL_RECORDS · Default 8192

The maximum number of records returned in a single call to poll()

TB_QUEUE_KAFKA_MAX_PARTITION_FETCH_BYTES · Default 16777216

The maximum amount of data per-partition the server will return. Records are fetched in batches by the consumer

TB_QUEUE_KAFKA_FETCH_MAX_BYTES · Default 134217728

The maximum amount of data the server will return. Records are fetched in batches by the consumer

TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS · Default 30000

(30 seconds)

TB_QUEUE_KAFKA_SESSION_TIMEOUT_MS · Default 10000

(10 seconds)

TB_QUEUE_KAFKA_AUTO_OFFSET_RESET · Default earliest

earliest, latest or none

TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD · Default false

Enable/Disable using of Confluent Cloud

TB_QUEUE_KAFKA_CONFLUENT_SSL_ALGORITHM · Default https

The endpoint identification algorithm used by clients to validate server hostname. The default value is https

TB_QUEUE_KAFKA_CONFLUENT_SASL_MECHANISM · Default PLAIN

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

TB_QUEUE_KAFKA_CONFLUENT_SASL_JAAS_CONFIG · Default org.apache.kafka.common.security.plain.PlainLoginModule required username=“CLUSTER_API_KEY” password=“CLUSTER_API_SECRET”;

Using JAAS Configuration for specifying multiple SASL mechanisms on a broker

TB_QUEUE_KAFKA_CONFLUENT_SECURITY_PROTOCOL · Default SASL_SSL

Protocol used to communicate with brokers. Valid values are: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL

TB_QUEUE_KAFKA_CONSUMER_PROPERTIES_PER_TOPIC_INLINE

If you override any default Kafka topic name using environment variables, you must also specify the related consumer properties for the new topic in consumer-properties-per-topic-inline. Otherwise, the topic will not inherit its expected configuration (e.g., max.poll.records, timeouts, etc). Format: “topic1:key1=value1,key2=value2;topic2:key=value” Example: “tb_core_modified.notifications:max.poll.records=10;tb_edge_modified:max.poll.records=10,enable.auto.commit=true”

TB_QUEUE_KAFKA_OTHER_PROPERTIES

In this section you can specify custom parameters (semicolon separated) for Kafka consumer/producer/admin

TB_QUEUE_KAFKA_RE_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000;partitions:1;min.insync.replicas:1

Kafka properties for Rule Engine

TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000;partitions:1;min.insync.replicas:1

Kafka properties for Core topics

TB_QUEUE_KAFKA_TA_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000;partitions:10;min.insync.replicas:1

Kafka properties for Transport Api topics

TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000;partitions:1;min.insync.replicas:1

Kafka properties for Notifications topics

TB_QUEUE_KAFKA_HOUSEKEEPER_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:1048576000;partitions:10;min.insync.replicas:1

Kafka properties for Housekeeper tasks topic

TB_QUEUE_KAFKA_TOPICS_CACHE_TTL_MS · Default 300000

Topics cache TTL in milliseconds. 5 minutes by default

TB_QUEUE_PARTITIONS_HASH_FUNCTION_NAME · Default murmur3_128

murmur3_32, murmur3_128 or sha256

TB_QUEUE_TRANSPORT_API_REQUEST_TOPIC · Default tb_transport.api.requests

Topic used to consume api requests from transport microservices

TB_QUEUE_TRANSPORT_API_RESPONSE_TOPIC · Default tb_transport.api.responses

Topic used to produce api responses to transport microservices

TB_QUEUE_TRANSPORT_MAX_PENDING_REQUESTS · Default 10000

Maximum pending api requests from transport microservices to be handled by server

TB_QUEUE_TRANSPORT_MAX_REQUEST_TIMEOUT · Default 10000

Maximum timeout in milliseconds to handle api request from transport microservice by server

TB_QUEUE_TRANSPORT_MAX_CALLBACK_THREADS · Default 100

Amount of threads used to invoke callbacks

TB_QUEUE_TRANSPORT_REQUEST_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll api requests from transport microservices

TB_QUEUE_TRANSPORT_RESPONSE_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll api response from transport microservices

TB_QUEUE_CORE_TOPIC · Default tb_core

Default topic name

TB_QUEUE_CORE_NOTIFICATIONS_TOPIC · Default tb_core.notifications

For high-priority notifications that require minimum latency and processing time

TB_QUEUE_CORE_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll messages by Core microservices

TB_QUEUE_CORE_PARTITIONS · Default 10

Amount of partitions used by Core microservices

TB_QUEUE_CORE_PACK_PROCESSING_TIMEOUT_MS · Default 60000

Timeout for processing a message pack by Core microservices

TB_QUEUE_US_TOPIC · Default tb_usage_stats

Default topic name

TB_QUEUE_CORE_STATS_ENABLED · Default false

Enable/disable statistics for Core microservices

TB_QUEUE_CORE_STATS_PRINT_INTERVAL_MS · Default 10000

Statistics printing interval for Core microservices

TB_HOUSEKEEPER_TOPIC · Default tb_housekeeper

Topic name for Housekeeper tasks

REMOTE_JS_EVAL_REQUEST_TOPIC · Default js_eval.requests

JS Eval request topic

REMOTE_JS_EVAL_RESPONSE_TOPIC · Default js_eval.responses

JS Eval responses topic prefix that is combined with node id

REMOTE_JS_MAX_PENDING_REQUESTS · Default 10000

JS Eval max pending requests

REMOTE_JS_MAX_REQUEST_TIMEOUT · Default 10000

JS Eval max request timeout

REMOTE_JS_RESPONSE_POLL_INTERVAL_MS · Default 25

JS response poll interval

TB_QUEUE_RULE_ENGINE_TOPIC · Default tb_rule_engine

Deprecated. It will be removed in the nearest releases

TB_QUEUE_RULE_ENGINE_NOTIFICATIONS_TOPIC · Default tb_rule_engine.notifications

For high-priority notifications that require minimum latency and processing time

TB_QUEUE_RULE_ENGINE_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll messages by Rule Engine

TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS · Default 60000

Timeout for processing a message pack of Rule Engine

TB_QUEUE_RULE_ENGINE_STATS_ENABLED · Default true

Enable/disable statistics for Rule Engine

TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS · Default 60000

Statistics printing interval for Rule Engine

TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC · Default tb_transport.notifications

For high priority notifications that require minimum latency and processing time

TB_QUEUE_TRANSPORT_NOTIFICATIONS_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll messages

TB_SERVICE_TYPE · Default tb-transport

service type

TB_SERVICE_ID

Unique id for this service (autogenerated if empty)

USAGE_STATS_REPORT_ENABLED · Default true

Enable/Disable the collection of statistics about API usage. Collected on a system and tenant level by default

USAGE_STATS_REPORT_PER_CUSTOMER_ENABLED · Default false

Enable/Disable collection of statistics about API usage on a customer level

USAGE_STATS_REPORT_INTERVAL · Default 60

Interval of reporting the statistics. By default, the summarized statistics are sent every 10 seconds

USAGE_STATS_REPORT_URGENT_INTERVAL · Default 10

Reporting interval for urgent keys (e.g. SMS, Email) that require quicker usage state updates

USAGE_STATS_REPORT_PACK_SIZE · Default 1024

Amount of statistic messages in pack

METRICS_ENABLED · Default false

Enable/disable actuator metrics.

METRICS_ENDPOINTS_EXPOSE · Default info

Expose metrics endpoint (use value ‘prometheus’ to enable prometheus metrics).

TB_NOTIFICATION_RULES_DEDUPLICATION_DURATIONS · Default RATE_LIMITS:14400000;

Semicolon-separated deduplication durations (in millis) for trigger types. Format: ‘NotificationRuleTriggerType1:123;NotificationRuleTriggerType2:456’