Skip to content
Stand with Ukraine flag

JS Executor Configuration

TB_QUEUE_TYPE · Default kafka

Queue type used for JS evaluation requests: kafka or in-memory

TB_QUEUE_PREFIX

Optional prefix applied to all queue/topic names; useful for environment isolation

REMOTE_JS_EVAL_REQUEST_TOPIC · Default js_eval.requests

Kafka topic name for incoming JS evaluation requests

HTTP_PORT · Default 8888

HTTP port exposing the /livenessProbe health check endpoint

REMOTE_JS_RESPONSE_POLL_INTERVAL_MS · Default 25

Interval in milliseconds to poll for JS execution responses

JS_MAX_RESULT_SIZE · Default 300000

Maximum allowed size in bytes of a JS execution result

TB_KAFKA_SERVERS · Default localhost:9092

Kafka Bootstrap Servers

TB_QUEUE_KAFKA_REPLICATION_FACTOR · Default 1

Number of replicas for each Kafka topic partition

TB_KAFKA_ACKS · Default 1

-1 = all; 0 = no acknowledgments; 1 = only waits for the leader to acknowledge

TB_KAFKA_BATCH_SIZE · Default 128

Maximum number of messages to accumulate before triggering a batch send

TB_KAFKA_LINGER_MS · Default 5

Time in milliseconds the producer waits before sending a batch, allowing more messages to accumulate

TB_KAFKA_PARTITIONS_CONSUMED_CONCURRENTLY · Default 1

(EXPERIMENTAL) increase this value if you are planning to handle more than one partition (scale up, scale down) - this will decrease the latency

TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS · Default 30000

Time in milliseconds to wait for a response to a Kafka request before timing out

TB_KAFKA_CONNECTION_TIMEOUT_MS · Default 1000

Time in milliseconds to wait when establishing a connection to a Kafka broker

TB_QUEUE_KAFKA_COMPRESSION · Default none

Message compression codec for the producer: none, gzip

TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES · Default retention.ms:604800000;segment.bytes:52428800;retention.bytes:104857600;partitions:100;min.insync.replicas:1

Semicolon-separated Kafka topic configuration properties applied on topic creation

TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD · Default false

Set to true to enable Confluent Cloud-specific configuration (SSL + SASL)

KAFKA_CLIENT_ID · Default kafkajs

Kafka client identifier; inject the pod name to easily identify the client via kafka-consumer-groups.sh

TB_KAFKA_SSL_ENABLED · Default false

Enable SSL/TLS for Kafka broker connections

TB_KAFKA_SSL_PEM_CERTIFICATE

TB_KAFKA_SSL_PEM_KEY

TB_KAFKA_SSL_PEM_KEY_PASSWORD

TB_KAFKA_SSL_PEM_TRUSTS_CERTIFICATE

TB_QUEUE_KAFKA_CONFLUENT_SASL_MECHANISM · Default PLAIN

SASL mechanism for Confluent Cloud authentication: PLAIN, SCRAM-SHA-256, or SCRAM-SHA-512

TB_QUEUE_KAFKA_CONFLUENT_USERNAME

TB_QUEUE_KAFKA_CONFLUENT_PASSWORD

LOGGER_LEVEL · Default info

Log level: trace, debug, info, warn, or error

LOG_FOLDER · Default logs

Directory path where log files are written

LOGGER_FILENAME · Default tb-js-executor-%DATE%.log

Log file name pattern; %DATE% is replaced with the current date

JavaScript execution and monitoring configuration

Section titled “JavaScript execution and monitoring configuration”

SCRIPT_USE_SANDBOX · Default true

Run scripts inside an isolated sandbox to prevent access to Node.js internals

MEMORY_USAGE_TRACE_FREQUENCY · Default 1000

Log memory usage every N script executions

SCRIPT_STAT_PRINT_FREQUENCY · Default 10000

Print execution statistics every N script executions

SCRIPT_BODY_TRACE_FREQUENCY · Default 10000

Log the script body every N script executions

MAX_ACTIVE_SCRIPTS · Default 1000

Maximum number of compiled scripts kept in the cache

SLOW_QUERY_LOG_MS · Default 5.000000

Execution time threshold in milliseconds above which a script is considered slow and logged

SLOW_QUERY_LOG_BODY · Default false

Log the script body when execution time exceeds slow_query_log_ms threshold