first-fix
This commit is contained in:
1 parent
6d87c1edc8
commit
565d9d673a
6284 files changed
+820267
-76
No files matched your search
@@ -0,0 +1,139 @@
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2023 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<version>0.6.2-SNAPSHOT</version>
|
||||
<artifactId>msa</artifactId>
|
||||
</parent>
|
||||
<groupId>org.thingsboard.msa</groupId>
|
||||
<artifactId>vc-executor</artifactId>
|
||||
|
||||
<name>ThingsBoard Version Control Executor</name>
|
||||
<url>https://thingsboard.io</url>
|
||||
<description>Project for ThingsBoard version control microservice</description>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<main.dir>${basedir}/../..</main.dir>
|
||||
<pkg.type>java</pkg.type>
|
||||
<pkg.disabled>false</pkg.disabled>
|
||||
<pkg.process-resources.phase>process-resources</pkg.process-resources.phase>
|
||||
<pkg.package.phase>package</pkg.package.phase>
|
||||
<pkg.name>tb-vc-executor</pkg.name>
|
||||
<pkg.copyInstallScripts>false</pkg.copyInstallScripts>
|
||||
<pkg.win.dist>${project.build.directory}/windows</pkg.win.dist>
|
||||
<pkg.implementationTitle>ThingsBoard Version Control Executor Service</pkg.implementationTitle>
|
||||
<pkg.mainClass>org.thingsboard.server.vc.ThingsboardVersionControlExecutorApplication</pkg.mainClass>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.thingsboard.common</groupId>
|
||||
<artifactId>queue</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.thingsboard.common</groupId>
|
||||
<artifactId>version-control</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-netty-shaded</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-protobuf</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.grpc</groupId>
|
||||
<artifactId>grpc-stub</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.junit.vintage</groupId>
|
||||
<artifactId>junit-vintage-engine</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.awaitility</groupId>
|
||||
<artifactId>awaitility</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${pkg.name}-${project.version}</finalName>
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>${project.basedir}/src/main/resources</directory>
|
||||
</resource>
|
||||
</resources>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.thingsboard</groupId>
|
||||
<artifactId>gradle-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-install-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jenkins</id>
|
||||
<name>Jenkins Repository</name>
|
||||
<url>https://repo.jenkins-ci.org/releases</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2023 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<!DOCTYPE configuration>
|
||||
<configuration>
|
||||
|
||||
<appender name="fileLogAppender"
|
||||
class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${pkg.logFolder}/${pkg.name}.log</file>
|
||||
<rollingPolicy
|
||||
class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<fileNamePattern>${pkg.logFolder}/${pkg.name}.%d{yyyy-MM-dd}.%i.log</fileNamePattern>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
<maxHistory>30</maxHistory>
|
||||
<totalSizeCap>3GB</totalSizeCap>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.thingsboard.server" level="INFO" />
|
||||
|
||||
<logger name="com.microsoft.azure.servicebus.primitives.CoreMessageReceiver" level="OFF" />
|
||||
<logger name="org.apache.kafka.common.utils.AppInfoParser" level="WARN"/>
|
||||
<logger name="org.apache.kafka.clients" level="WARN"/>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="fileLogAppender"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Copyright © 2016-2023 The Thingsboard Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
export JAVA_OPTS="$JAVA_OPTS -Xlog:gc*,heap*,age*,safepoint=debug:file=@pkg.logFolder@/gc.log:time,uptime,level,tags:filecount=10,filesize=10M"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:+IgnoreUnrecognizedVMOptions -XX:+HeapDumpOnOutOfMemoryError"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:-UseBiasedLocking -XX:+UseTLAB -XX:+ResizeTLAB -XX:+PerfDisableSharedMem -XX:+UseCondCardMark"
|
||||
export JAVA_OPTS="$JAVA_OPTS -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:+UseStringDeduplication -XX:+ParallelRefProcEnabled -XX:MaxTenuringThreshold=10"
|
||||
export LOG_FILENAME=${pkg.name}.out
|
||||
export LOADER_PATH=${pkg.installFolder}/conf
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* Copyright © 2016-2023 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.thingsboard.server.vc; /**
|
||||
* Copyright © 2016-2022 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
@EnableScheduling
|
||||
@ComponentScan({"org.thingsboard.server", "org.thingsboard.server.common", "org.thingsboard.server.service.sync.vc"})
|
||||
public class ThingsboardVersionControlExecutorApplication {
|
||||
|
||||
private static final String SPRING_CONFIG_NAME_KEY = "--spring.config.name";
|
||||
private static final String DEFAULT_SPRING_CONFIG_PARAM = SPRING_CONFIG_NAME_KEY + "=" + "tb-vc-executor";
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ThingsboardVersionControlExecutorApplication.class, updateArguments(args));
|
||||
}
|
||||
|
||||
private static String[] updateArguments(String[] args) {
|
||||
if (Arrays.stream(args).noneMatch(arg -> arg.startsWith(SPRING_CONFIG_NAME_KEY))) {
|
||||
String[] modifiedArgs = new String[args.length + 1];
|
||||
System.arraycopy(args, 0, modifiedArgs, 0, args.length);
|
||||
modifiedArgs[args.length] = DEFAULT_SPRING_CONFIG_PARAM;
|
||||
return modifiedArgs;
|
||||
}
|
||||
return args;
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* Copyright © 2016-2023 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.thingsboard.server.vc.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.thingsboard.server.queue.discovery.QueueRoutingInfo;
|
||||
import org.thingsboard.server.queue.discovery.QueueRoutingInfoService;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class VersionControlQueueRoutingInfoService implements QueueRoutingInfoService {
|
||||
@Override
|
||||
public List<QueueRoutingInfo> getAllQueuesRoutingInfo() {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* Copyright © 2016-2023 The Thingsboard Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.thingsboard.server.vc.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.thingsboard.server.common.data.id.TenantId;
|
||||
import org.thingsboard.server.queue.discovery.TenantRoutingInfo;
|
||||
import org.thingsboard.server.queue.discovery.TenantRoutingInfoService;
|
||||
|
||||
@Service
|
||||
public class VersionControlTenantRoutingInfoService implements TenantRoutingInfoService {
|
||||
@Override
|
||||
public TenantRoutingInfo getRoutingInfo(TenantId tenantId) {
|
||||
//This dummy implementation is ok since Version Control service does not produce any rule engine messages.
|
||||
return new TenantRoutingInfo(tenantId, false);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!--
|
||||
|
||||
Copyright © 2016-2023 The Thingsboard Authors
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
<!DOCTYPE configuration>
|
||||
<configuration scan="true" scanPeriod="10 seconds">
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{ISO8601} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<logger name="org.thingsboard.server" level="INFO" />
|
||||
|
||||
<logger name="com.microsoft.azure.servicebus.primitives.CoreMessageReceiver" level="OFF" />
|
||||
<logger name="org.apache.kafka.common.utils.AppInfoParser" level="WARN"/>
|
||||
<logger name="org.apache.kafka.clients" level="WARN"/>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT"/>
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,198 @@
|
||||
#
|
||||
# Copyright © 2016-2023 The Thingsboard Authors
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
# If you enabled process metrics you should also enable 'web-environment'.
|
||||
spring.main.web-environment: "${WEB_APPLICATION_ENABLE:false}"
|
||||
# If you enabled process metrics you should set 'web-application-type' to 'servlet' value.
|
||||
spring.main.web-application-type: "${WEB_APPLICATION_TYPE:none}"
|
||||
|
||||
spring.main.allow-circular-references: "true"
|
||||
|
||||
server:
|
||||
# Server bind address (has no effect if web-environment is disabled).
|
||||
address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
|
||||
# Server bind port (has no effect if web-environment is disabled).
|
||||
port: "${HTTP_BIND_PORT:8086}"
|
||||
|
||||
# Zookeeper connection parameters. Used for service discovery.
|
||||
zk:
|
||||
# Enable/disable zookeeper discovery service.
|
||||
enabled: "${ZOOKEEPER_ENABLED:true}"
|
||||
# Zookeeper connect string
|
||||
url: "${ZOOKEEPER_URL:localhost:2181}"
|
||||
# Zookeeper retry interval in milliseconds
|
||||
retry_interval_ms: "${ZOOKEEPER_RETRY_INTERVAL_MS:3000}"
|
||||
# Zookeeper connection timeout in milliseconds
|
||||
connection_timeout_ms: "${ZOOKEEPER_CONNECTION_TIMEOUT_MS:3000}"
|
||||
# Zookeeper session timeout in milliseconds
|
||||
session_timeout_ms: "${ZOOKEEPER_SESSION_TIMEOUT_MS:3000}"
|
||||
# Name of the directory in zookeeper 'filesystem'
|
||||
zk_dir: "${ZOOKEEPER_NODES_DIR:/thingsboard}"
|
||||
|
||||
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)
|
||||
in_memory:
|
||||
stats:
|
||||
# For debug lvl
|
||||
print-interval-ms: "${TB_QUEUE_IN_MEMORY_STATS_PRINT_INTERVAL_MS:60000}"
|
||||
kafka:
|
||||
bootstrap.servers: "${TB_KAFKA_SERVERS:localhost:9092}"
|
||||
ssl:
|
||||
enabled: "${TB_KAFKA_SSL_ENABLED:false}"
|
||||
truststore.location: "${TB_KAFKA_SSL_TRUSTSTORE_LOCATION:}"
|
||||
truststore.password: "${TB_KAFKA_SSL_TRUSTSTORE_PASSWORD:}"
|
||||
keystore.location: "${TB_KAFKA_SSL_KEYSTORE_LOCATION:}"
|
||||
keystore.password: "${TB_KAFKA_SSL_KEYSTORE_PASSWORD:}"
|
||||
key.password: "${TB_KAFKA_SSL_KEY_PASSWORD:}"
|
||||
acks: "${TB_KAFKA_ACKS:all}"
|
||||
retries: "${TB_KAFKA_RETRIES:1}"
|
||||
compression.type: "${TB_KAFKA_COMPRESSION_TYPE:none}" # none or gzip
|
||||
batch.size: "${TB_KAFKA_BATCH_SIZE:16384}"
|
||||
linger.ms: "${TB_KAFKA_LINGER_MS:1}"
|
||||
max.request.size: "${TB_KAFKA_MAX_REQUEST_SIZE:1048576}"
|
||||
max.in.flight.requests.per.connection: "${TB_KAFKA_MAX_IN_FLIGHT_REQUESTS_PER_CONNECTION:5}"
|
||||
buffer.memory: "${TB_BUFFER_MEMORY:33554432}"
|
||||
replication_factor: "${TB_QUEUE_KAFKA_REPLICATION_FACTOR:1}"
|
||||
max_poll_interval_ms: "${TB_QUEUE_KAFKA_MAX_POLL_INTERVAL_MS:300000}"
|
||||
max_poll_records: "${TB_QUEUE_KAFKA_MAX_POLL_RECORDS:8192}"
|
||||
max_partition_fetch_bytes: "${TB_QUEUE_KAFKA_MAX_PARTITION_FETCH_BYTES:16777216}"
|
||||
fetch_max_bytes: "${TB_QUEUE_KAFKA_FETCH_MAX_BYTES:134217728}"
|
||||
request.timeout.ms: "${TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS:30000}" # (30 seconds) # refer to https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#producerconfigs_request.timeout.ms
|
||||
session.timeout.ms: "${TB_QUEUE_KAFKA_SESSION_TIMEOUT_MS:10000}" # (10 seconds) # refer to https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_session.timeout.ms
|
||||
use_confluent_cloud: "${TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD:false}"
|
||||
confluent:
|
||||
ssl.algorithm: "${TB_QUEUE_KAFKA_CONFLUENT_SSL_ALGORITHM:https}"
|
||||
sasl.mechanism: "${TB_QUEUE_KAFKA_CONFLUENT_SASL_MECHANISM:PLAIN}"
|
||||
sasl.config: "${TB_QUEUE_KAFKA_CONFLUENT_SASL_JAAS_CONFIG:org.apache.kafka.common.security.plain.PlainLoginModule required username=\"CLUSTER_API_KEY\" password=\"CLUSTER_API_SECRET\";}"
|
||||
security.protocol: "${TB_QUEUE_KAFKA_CONFLUENT_SECURITY_PROTOCOL:SASL_SSL}"
|
||||
# Key-value properties for Kafka consumer per specific topic, e.g. tb_ota_package is a topic name for ota, tb_rule_engine.sq is a topic name for default SequentialByOriginator queue.
|
||||
# Check TB_QUEUE_CORE_OTA_TOPIC and TB_QUEUE_RE_SQ_TOPIC params
|
||||
consumer-properties-per-topic:
|
||||
tb_ota_package:
|
||||
- key: max.poll.records
|
||||
value: "${TB_QUEUE_KAFKA_OTA_MAX_POLL_RECORDS:10}"
|
||||
tb_version_control:
|
||||
- key: max.poll.interval.ms
|
||||
value: "${TB_QUEUE_KAFKA_VC_MAX_POLL_INTERVAL_MS:600000}"
|
||||
# tb_rule_engine.sq:
|
||||
# - key: max.poll.records
|
||||
# value: "${TB_QUEUE_KAFKA_SQ_MAX_POLL_RECORDS:1024}"
|
||||
other-inline: "${TB_QUEUE_KAFKA_OTHER_PROPERTIES:}" # In this section you can specify custom parameters (semicolon separated) for Kafka consumer/producer/admin # Example "metrics.recording.level:INFO;metrics.sample.window.ms:30000"
|
||||
other: # DEPRECATED. In this section you can specify custom parameters for Kafka consumer/producer and expose the env variables to configure outside
|
||||
# - key: "request.timeout.ms" # refer to https://docs.confluent.io/platform/current/installation/configuration/producer-configs.html#producerconfigs_request.timeout.ms
|
||||
# value: "${TB_QUEUE_KAFKA_REQUEST_TIMEOUT_MS:30000}" # (30 seconds)
|
||||
# - key: "session.timeout.ms" # refer to https://docs.confluent.io/platform/current/installation/configuration/consumer-configs.html#consumerconfigs_session.timeout.ms
|
||||
# value: "${TB_QUEUE_KAFKA_SESSION_TIMEOUT_MS:10000}" # (10 seconds)
|
||||
topic-properties:
|
||||
core: "${TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
|
||||
notifications: "${TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
|
||||
version-control: "${TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
|
||||
consumer-stats:
|
||||
enabled: "${TB_QUEUE_KAFKA_CONSUMER_STATS_ENABLED:true}"
|
||||
print-interval-ms: "${TB_QUEUE_KAFKA_CONSUMER_STATS_MIN_PRINT_INTERVAL_MS:60000}"
|
||||
kafka-response-timeout-ms: "${TB_QUEUE_KAFKA_CONSUMER_STATS_RESPONSE_TIMEOUT_MS:1000}"
|
||||
aws_sqs:
|
||||
use_default_credential_provider_chain: "${TB_QUEUE_AWS_SQS_USE_DEFAULT_CREDENTIAL_PROVIDER_CHAIN:false}"
|
||||
access_key_id: "${TB_QUEUE_AWS_SQS_ACCESS_KEY_ID:YOUR_KEY}"
|
||||
secret_access_key: "${TB_QUEUE_AWS_SQS_SECRET_ACCESS_KEY:YOUR_SECRET}"
|
||||
region: "${TB_QUEUE_AWS_SQS_REGION:YOUR_REGION}"
|
||||
threads_per_topic: "${TB_QUEUE_AWS_SQS_THREADS_PER_TOPIC:1}"
|
||||
queue-properties:
|
||||
core: "${TB_QUEUE_AWS_SQS_CORE_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
|
||||
notifications: "${TB_QUEUE_AWS_SQS_NOTIFICATIONS_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
|
||||
version-control: "${TB_QUEUE_AWS_SQS_VC_QUEUE_PROPERTIES:VisibilityTimeout:30;MaximumMessageSize:262144;MessageRetentionPeriod:604800}"
|
||||
# VisibilityTimeout in seconds;MaximumMessageSize in bytes;MessageRetentionPeriod in seconds
|
||||
pubsub:
|
||||
project_id: "${TB_QUEUE_PUBSUB_PROJECT_ID:YOUR_PROJECT_ID}"
|
||||
service_account: "${TB_QUEUE_PUBSUB_SERVICE_ACCOUNT:YOUR_SERVICE_ACCOUNT}"
|
||||
max_msg_size: "${TB_QUEUE_PUBSUB_MAX_MSG_SIZE:1048576}" #in bytes
|
||||
max_messages: "${TB_QUEUE_PUBSUB_MAX_MESSAGES:1000}"
|
||||
queue-properties:
|
||||
core: "${TB_QUEUE_PUBSUB_CORE_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
|
||||
notifications: "${TB_QUEUE_PUBSUB_NOTIFICATIONS_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
|
||||
version-control: "${TB_QUEUE_PUBSUB_VC_QUEUE_PROPERTIES:ackDeadlineInSec:30;messageRetentionInSec:604800}"
|
||||
service_bus:
|
||||
namespace_name: "${TB_QUEUE_SERVICE_BUS_NAMESPACE_NAME:YOUR_NAMESPACE_NAME}"
|
||||
sas_key_name: "${TB_QUEUE_SERVICE_BUS_SAS_KEY_NAME:YOUR_SAS_KEY_NAME}"
|
||||
sas_key: "${TB_QUEUE_SERVICE_BUS_SAS_KEY:YOUR_SAS_KEY}"
|
||||
max_messages: "${TB_QUEUE_SERVICE_BUS_MAX_MESSAGES:1000}"
|
||||
queue-properties:
|
||||
core: "${TB_QUEUE_SERVICE_BUS_CORE_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
|
||||
notifications: "${TB_QUEUE_SERVICE_BUS_NOTIFICATIONS_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
|
||||
version-control: "${TB_QUEUE_SERVICE_BUS_VC_QUEUE_PROPERTIES:lockDurationInSec:30;maxSizeInMb:1024;messageTimeToLiveInSec:604800}"
|
||||
rabbitmq:
|
||||
exchange_name: "${TB_QUEUE_RABBIT_MQ_EXCHANGE_NAME:}"
|
||||
host: "${TB_QUEUE_RABBIT_MQ_HOST:localhost}"
|
||||
port: "${TB_QUEUE_RABBIT_MQ_PORT:5672}"
|
||||
virtual_host: "${TB_QUEUE_RABBIT_MQ_VIRTUAL_HOST:/}"
|
||||
username: "${TB_QUEUE_RABBIT_MQ_USERNAME:YOUR_USERNAME}"
|
||||
password: "${TB_QUEUE_RABBIT_MQ_PASSWORD:YOUR_PASSWORD}"
|
||||
automatic_recovery_enabled: "${TB_QUEUE_RABBIT_MQ_AUTOMATIC_RECOVERY_ENABLED:false}"
|
||||
connection_timeout: "${TB_QUEUE_RABBIT_MQ_CONNECTION_TIMEOUT:60000}"
|
||||
handshake_timeout: "${TB_QUEUE_RABBIT_MQ_HANDSHAKE_TIMEOUT:10000}"
|
||||
queue-properties:
|
||||
core: "${TB_QUEUE_RABBIT_MQ_CORE_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
|
||||
transport-api: "${TB_QUEUE_RABBIT_MQ_TA_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
|
||||
version-control: "${TB_QUEUE_RABBIT_MQ_VC_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
|
||||
partitions:
|
||||
hash_function_name: "${TB_QUEUE_PARTITIONS_HASH_FUNCTION_NAME:murmur3_128}" # murmur3_32, murmur3_128 or sha256
|
||||
core:
|
||||
topic: "${TB_QUEUE_CORE_TOPIC:tb_core}"
|
||||
poll-interval: "${TB_QUEUE_CORE_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_CORE_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_CORE_PACK_PROCESSING_TIMEOUT_MS:2000}"
|
||||
ota:
|
||||
topic: "${TB_QUEUE_CORE_OTA_TOPIC:tb_ota_package}"
|
||||
pack-interval-ms: "${TB_QUEUE_CORE_OTA_PACK_INTERVAL_MS:60000}"
|
||||
pack-size: "${TB_QUEUE_CORE_OTA_PACK_SIZE:100}"
|
||||
usage-stats-topic: "${TB_QUEUE_US_TOPIC:tb_usage_stats}"
|
||||
stats:
|
||||
enabled: "${TB_QUEUE_CORE_STATS_ENABLED:true}"
|
||||
print-interval-ms: "${TB_QUEUE_CORE_STATS_PRINT_INTERVAL_MS:60000}"
|
||||
vc:
|
||||
topic: "${TB_QUEUE_VC_TOPIC:tb_version_control}"
|
||||
partitions: "${TB_QUEUE_VC_PARTITIONS:10}"
|
||||
poll-interval: "${TB_QUEUE_VC_INTERVAL_MS:25}"
|
||||
pack-processing-timeout: "${TB_QUEUE_VC_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
msg-chunk-size: "${TB_QUEUE_VC_MSG_CHUNK_SIZE:250000}"
|
||||
|
||||
vc:
|
||||
# Pool size for handling export tasks
|
||||
thread_pool_size: "${TB_VC_POOL_SIZE:2}"
|
||||
git:
|
||||
# Pool size for handling the git IO operations
|
||||
io_pool_size: "${TB_VC_GIT_POOL_SIZE:3}"
|
||||
repositories-folder: "${TB_VC_GIT_REPOSITORIES_FOLDER:${java.io.tmpdir}/repositories}"
|
||||
|
||||
# Usage statistics parameters
|
||||
usage:
|
||||
stats:
|
||||
report:
|
||||
enabled: "${USAGE_STATS_REPORT_ENABLED:true}"
|
||||
enabled_per_customer: "${USAGE_STATS_REPORT_PER_CUSTOMER_ENABLED:false}"
|
||||
interval: "${USAGE_STATS_REPORT_INTERVAL:10}"
|
||||
|
||||
metrics:
|
||||
# Enable/disable actuator metrics.
|
||||
enabled: "${METRICS_ENABLED:false}"
|
||||
timer:
|
||||
# Metrics percentiles returned by actuator for timer metrics. List of double values (divided by ,).
|
||||
percentiles: "${METRICS_TIMER_PERCENTILES:0.5}"
|
||||
|
||||
service:
|
||||
type: "${TB_SERVICE_TYPE:tb-vc-executor}"
|
||||
# Unique id for this service (autogenerated if empty)
|
||||
id: "${TB_SERVICE_ID:}"
|
||||
Reference in new issue
Block a user