thingsboard-memoizeit
Changes
application/src/main/java/org/thingsboard/server/actors/shared/rulechain/RuleChainManager.java 2(+1 -1)
msa/docker/.env 2(+1 -1)
msa/docker/docker-compose.yml 1(+1 -0)
Details
diff --git a/application/src/main/java/org/thingsboard/server/actors/shared/rulechain/RuleChainManager.java b/application/src/main/java/org/thingsboard/server/actors/shared/rulechain/RuleChainManager.java
index 11ed5a3..d349fec 100644
--- a/application/src/main/java/org/thingsboard/server/actors/shared/rulechain/RuleChainManager.java
+++ b/application/src/main/java/org/thingsboard/server/actors/shared/rulechain/RuleChainManager.java
@@ -50,7 +50,7 @@ public abstract class RuleChainManager extends EntityActorsManager<RuleChainId,
@Override
public void visit(RuleChain entity, ActorRef actorRef) {
- if (entity.isRoot()) {
+ if (entity != null && entity.isRoot()) {
rootChain = entity;
rootChainActor = actorRef;
}
diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml
index 8d65e3d..17123b5 100644
--- a/application/src/main/resources/thingsboard.yml
+++ b/application/src/main/resources/thingsboard.yml
@@ -432,6 +432,10 @@ transport:
auto_commit_interval: "${TB_RULE_ENGINE_AUTO_COMMIT_INTERVAL_MS:100}"
notifications:
topic: "${TB_TRANSPORT_NOTIFICATIONS_TOPIC:tb.transport.notifications}"
+ rate_limits:
+ enabled: "${TB_TRANSPORT_RATE_LIMITS_ENABLED:false}"
+ tenant: "${TB_TRANSPORT_RATE_LIMITS_TENANT:1000:1,20000:60}"
+ device: "${TB_TRANSPORT_RATE_LIMITS_DEVICE:10:1,300:60}"
# Local HTTP transport parameters
http:
enabled: "${HTTP_ENABLED:true}"
msa/docker/.env 2(+1 -1)
diff --git a/msa/docker/.env b/msa/docker/.env
index 3d8faeb..afcd91c 100644
--- a/msa/docker/.env
+++ b/msa/docker/.env
@@ -10,4 +10,4 @@ COAP_TRANSPORT_DOCKER_NAME=tb-coap-transport
TB_VERSION=2.2.0-SNAPSHOT
-KAFKA_TOPICS=js.eval.requests:100:1:delete --config=retention.ms=60000 --config=retention.bytes=1073741824,tb.transport.api.requests:30:1:delete --config=retention.ms=60000 --config=retention.bytes=1073741824,tb.rule-engine:30:1
+KAFKA_TOPICS=js.eval.requests:100:1:delete --config=retention.ms=60000 --config=segment.bytes=26214400 --config=retention.bytes=104857600,tb.transport.api.requests:30:1:delete --config=retention.ms=60000 --config=segment.bytes=26214400 --config=retention.bytes=104857600,tb.rule-engine:30:1
msa/docker/docker-compose.yml 1(+1 -0)
diff --git a/msa/docker/docker-compose.yml b/msa/docker/docker-compose.yml
index e3b56ae..5410533 100644
--- a/msa/docker/docker-compose.yml
+++ b/msa/docker/docker-compose.yml
@@ -37,6 +37,7 @@ services:
KAFKA_CREATE_TOPICS: "${KAFKA_TOPICS}"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_LOG_RETENTION_BYTES: 1073741824
+ KAFKA_LOG_SEGMENT_BYTES: 268435456
KAFKA_LOG_RETENTION_MS: 300000
KAFKA_LOG_CLEANUP_POLICY: delete
depends_on:
diff --git a/transport/coap/src/main/resources/tb-coap-transport.yml b/transport/coap/src/main/resources/tb-coap-transport.yml
index 1790d82..822d104 100644
--- a/transport/coap/src/main/resources/tb-coap-transport.yml
+++ b/transport/coap/src/main/resources/tb-coap-transport.yml
@@ -23,6 +23,10 @@ transport:
bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
bind_port: "${COAP_BIND_PORT:5683}"
timeout: "${COAP_TIMEOUT:10000}"
+ rate_limits:
+ enabled: "${TB_TRANSPORT_RATE_LIMITS_ENABLED:false}"
+ tenant: "${TB_TRANSPORT_RATE_LIMITS_TENANT:1000:1,20000:60}"
+ device: "${TB_TRANSPORT_RATE_LIMITS_DEVICE:10:1,300:60}"
#Quota parameters
quota:
diff --git a/transport/http/src/main/resources/tb-http-transport.yml b/transport/http/src/main/resources/tb-http-transport.yml
index 65a1ad9..650bfdf 100644
--- a/transport/http/src/main/resources/tb-http-transport.yml
+++ b/transport/http/src/main/resources/tb-http-transport.yml
@@ -24,6 +24,10 @@ server:
transport:
http:
request_timeout: "${HTTP_REQUEST_TIMEOUT:60000}"
+ rate_limits:
+ enabled: "${TB_TRANSPORT_RATE_LIMITS_ENABLED:false}"
+ tenant: "${TB_TRANSPORT_RATE_LIMITS_TENANT:1000:1,20000:60}"
+ device: "${TB_TRANSPORT_RATE_LIMITS_DEVICE:10:1,300:60}"
#Quota parameters
quota: