Browse Source
Merge pull request #9061 from YevhenBondarenko/feature/recalculate
updated recalculate_delay
pull/9079/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with
11 additions and
8 deletions
application/src/main/resources/thingsboard.yml
common/queue/src/main/java/org/thingsboard/server/queue/discovery/ZkDiscoveryService.java
msa/vc-executor/src/main/resources/tb-vc-executor.yml
transport/coap/src/main/resources/tb-coap-transport.yml
transport/http/src/main/resources/tb-http-transport.yml
transport/lwm2m/src/main/resources/tb-lwm2m-transport.yml
transport/mqtt/src/main/resources/tb-mqtt-transport.yml
transport/snmp/src/main/resources/tb-snmp-transport.yml
@ -96,7 +96,10 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:60000}"
# The recalculate_delay property 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.
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cluster:
stats:
@ -69,7 +69,7 @@ public class ZkDiscoveryService implements DiscoveryService, PathChildrenCacheLi
private Integer zkSessionTimeout ;
@Value ( "${zk.zk_dir}" )
private String zkDir ;
@Value ( "${zk.recalculate_delay:6000 0}" )
@Value ( "${zk.recalculate_delay:0}" )
private Long recalculateDelay ;
protected final ConcurrentHashMap < String , ScheduledFuture < ? > > delayedTasks ;
@ -41,7 +41,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
queue:
type : "${TB_QUEUE_TYPE:kafka}" # in-memory or kafka (Apache Kafka) or aws-sqs (AWS SQS) or pubsub (PubSub) or service-bus (Azure Service Bus) or rabbitmq (RabbitMQ)
@ -41,7 +41,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cache:
type : "${CACHE_TYPE:redis}"
@ -68,7 +68,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cache:
type : "${CACHE_TYPE:redis}"
@ -41,7 +41,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cache:
type : "${CACHE_TYPE:redis}"
@ -41,7 +41,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cache:
type : "${CACHE_TYPE:redis}"
@ -41,7 +41,7 @@ zk:
session_timeout_ms : "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
# Name of the directory in zookeeper 'filesystem'
zk_dir : "${ZOOKEEPER_NODES_DIR:/thingsboard}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:6000 0}"
recalculate_delay : "${ZOOKEEPER_RECALCULATE_DELAY_MS:0}"
cache:
type : "${CACHE_TYPE:redis}"