Commit a89be64d9a641e5fd8c33d3217c302a08de326d0

Authored by Andrew Shvayka
Committed by GitHub
2 parents 759bf330 42438e4c

Merge pull request #4487 from ViacheslavKlimov/feature/snmp-docker

Docker setup for SNMP transport
... ... @@ -9,6 +9,7 @@ MQTT_TRANSPORT_DOCKER_NAME=tb-mqtt-transport
9 9 HTTP_TRANSPORT_DOCKER_NAME=tb-http-transport
10 10 COAP_TRANSPORT_DOCKER_NAME=tb-coap-transport
11 11 LWM2M_TRANSPORT_DOCKER_NAME=tb-lwm2m-transport
  12 +SNMP_TRANSPORT_DOCKER_NAME=tb-snmp-transport
12 13
13 14 TB_VERSION=latest
14 15
... ...
... ... @@ -74,3 +74,8 @@ services:
74 74 - queue-aws-sqs.env
75 75 depends_on:
76 76 - zookeeper
  77 + tb-snmp-transport:
  78 + env_file:
  79 + - queue-aws-sqs.env
  80 + depends_on:
  81 + - zookeeper
... ...
... ... @@ -58,3 +58,6 @@ services:
58 58 tb-lwm2m-transport:
59 59 env_file:
60 60 - queue-confluent.env
  61 + tb-snmp-transport:
  62 + env_file:
  63 + - queue-confluent.env
... ...
... ... @@ -85,3 +85,8 @@ services:
85 85 - queue-kafka.env
86 86 depends_on:
87 87 - kafka
  88 + tb-snmp-transport:
  89 + env_file:
  90 + - queue-kafka.env
  91 + depends_on:
  92 + - kafka
... ...
... ... @@ -50,6 +50,9 @@ services:
50 50 tb-mqtt-transport2:
51 51 volumes:
52 52 - tb-mqtt-transport-log-volume:/var/log/tb-mqtt-transport
  53 + tb-snmp-transport:
  54 + volumes:
  55 + - tb-snmp-transport-log-volume:/var/log/tb-snmp-transport
53 56
54 57 volumes:
55 58 postgres-db-volume:
... ... @@ -70,3 +73,6 @@ volumes:
70 73 tb-mqtt-transport-log-volume:
71 74 external: true
72 75 name: ${TB_MQTT_TRANSPORT_LOG_VOLUME}
  76 + tb-snmp-transport-log-volume:
  77 + external: true
  78 + name: ${TB_SNMP_TRANSPORT_LOG_VOLUME}
... ...
... ... @@ -74,3 +74,8 @@ services:
74 74 - queue-pubsub.env
75 75 depends_on:
76 76 - zookeeper
  77 + tb-snmp-transport:
  78 + env_file:
  79 + - queue-pubsub.env
  80 + depends_on:
  81 + - zookeeper
... ...
... ... @@ -74,3 +74,8 @@ services:
74 74 - queue-rabbitmq.env
75 75 depends_on:
76 76 - zookeeper
  77 + tb-snmp-transport:
  78 + env_file:
  79 + - queue-rabbitmq.env
  80 + depends_on:
  81 + - zookeeper
... ...
... ... @@ -72,3 +72,8 @@ services:
72 72 - queue-service-bus.env
73 73 depends_on:
74 74 - zookeeper
  75 + tb-snmp-transport:
  76 + env_file:
  77 + - queue-service-bus.env
  78 + depends_on:
  79 + - zookeeper
... ...
... ... @@ -217,6 +217,18 @@ services:
217 217 - ./tb-transports/lwm2m/log:/var/log/tb-lwm2m-transport
218 218 depends_on:
219 219 - zookeeper
  220 + tb-snmp-transport:
  221 + restart: always
  222 + image: "${DOCKER_REPO}/${SNMP_TRANSPORT_DOCKER_NAME}:${TB_VERSION}"
  223 + environment:
  224 + TB_SERVICE_ID: tb-snmp-transport
  225 + env_file:
  226 + - tb-snmp-transport.env
  227 + volumes:
  228 + - ./tb-transports/snmp/conf:/config
  229 + - ./tb-transports/snmp/log:/var/log/tb-snmp-transport
  230 + depends_on:
  231 + - zookeeper
220 232 tb-web-ui1:
221 233 restart: always
222 234 image: "${DOCKER_REPO}/${WEB_UI_DOCKER_NAME}:${TB_VERSION}"
... ...
... ... @@ -24,3 +24,5 @@ mkdir -p tb-transports/lwm2m/log && sudo chown -R 799:799 tb-transports/lwm2m/lo
24 24 mkdir -p tb-transports/http/log && sudo chown -R 799:799 tb-transports/http/log
25 25
26 26 mkdir -p tb-transports/mqtt/log && sudo chown -R 799:799 tb-transports/mqtt/log
  27 +
  28 +mkdir -p tb-transports/snmp/log && sudo chown -R 799:799 tb-transports/snmp/log
... ...
  1 +ZOOKEEPER_ENABLED=true
  2 +ZOOKEEPER_URL=zookeeper:2181
... ...
... ... @@ -32,6 +32,7 @@ public class ThingsBoardDbInstaller extends ExternalResource {
32 32 private final static String TB_LWM2M_TRANSPORT_LOG_VOLUME = "tb-lwm2m-transport-log-test-volume";
33 33 private final static String TB_HTTP_TRANSPORT_LOG_VOLUME = "tb-http-transport-log-test-volume";
34 34 private final static String TB_MQTT_TRANSPORT_LOG_VOLUME = "tb-mqtt-transport-log-test-volume";
  35 + private final static String TB_SNMP_TRANSPORT_LOG_VOLUME = "tb-snmp-transport-log-test-volume";
35 36
36 37 private final DockerComposeExecutor dockerCompose;
37 38
... ... @@ -41,6 +42,7 @@ public class ThingsBoardDbInstaller extends ExternalResource {
41 42 private final String tbLwm2mTransportLogVolume;
42 43 private final String tbHttpTransportLogVolume;
43 44 private final String tbMqttTransportLogVolume;
  45 + private final String tbSnmpTransportLogVolume;
44 46 private final Map<String, String> env;
45 47
46 48 public ThingsBoardDbInstaller() {
... ... @@ -57,6 +59,7 @@ public class ThingsBoardDbInstaller extends ExternalResource {
57 59 tbLwm2mTransportLogVolume = project + "_" + TB_LWM2M_TRANSPORT_LOG_VOLUME;
58 60 tbHttpTransportLogVolume = project + "_" + TB_HTTP_TRANSPORT_LOG_VOLUME;
59 61 tbMqttTransportLogVolume = project + "_" + TB_MQTT_TRANSPORT_LOG_VOLUME;
  62 + tbSnmpTransportLogVolume = project + "_" + TB_SNMP_TRANSPORT_LOG_VOLUME;
60 63
61 64 dockerCompose = new DockerComposeExecutor(composeFiles, project);
62 65
... ... @@ -67,6 +70,7 @@ public class ThingsBoardDbInstaller extends ExternalResource {
67 70 env.put("TB_LWM2M_TRANSPORT_LOG_VOLUME", tbLwm2mTransportLogVolume);
68 71 env.put("TB_HTTP_TRANSPORT_LOG_VOLUME", tbHttpTransportLogVolume);
69 72 env.put("TB_MQTT_TRANSPORT_LOG_VOLUME", tbMqttTransportLogVolume);
  73 + env.put("TB_SNMP_TRANSPORT_LOG_VOLUME", tbSnmpTransportLogVolume);
70 74 dockerCompose.withEnv(env);
71 75 }
72 76
... ... @@ -96,6 +100,9 @@ public class ThingsBoardDbInstaller extends ExternalResource {
96 100 dockerCompose.withCommand("volume create " + tbMqttTransportLogVolume);
97 101 dockerCompose.invokeDocker();
98 102
  103 + dockerCompose.withCommand("volume create " + tbSnmpTransportLogVolume);
  104 + dockerCompose.invokeDocker();
  105 +
99 106 dockerCompose.withCommand("up -d redis postgres");
100 107 dockerCompose.invokeCompose();
101 108
... ... @@ -117,9 +124,11 @@ public class ThingsBoardDbInstaller extends ExternalResource {
117 124 copyLogs(tbLwm2mTransportLogVolume, "./target/tb-lwm2m-transport-logs/");
118 125 copyLogs(tbHttpTransportLogVolume, "./target/tb-http-transport-logs/");
119 126 copyLogs(tbMqttTransportLogVolume, "./target/tb-mqtt-transport-logs/");
  127 + copyLogs(tbSnmpTransportLogVolume, "./target/tb-snmp-transport-logs/");
120 128
121 129 dockerCompose.withCommand("volume rm -f " + postgresDataVolume + " " + tbLogVolume +
122   - " " + tbCoapTransportLogVolume + " " + tbLwm2mTransportLogVolume + " " + tbHttpTransportLogVolume + " " + tbMqttTransportLogVolume);
  130 + " " + tbCoapTransportLogVolume + " " + tbLwm2mTransportLogVolume + " " + tbHttpTransportLogVolume +
  131 + " " + tbMqttTransportLogVolume + " " + tbSnmpTransportLogVolume);
123 132 dockerCompose.invokeDocker();
124 133 }
125 134
... ...
... ... @@ -14,13 +14,6 @@
14 14 # limitations under the License.
15 15 #
16 16
17   -server:
18   - # Server bind address
19   - address: "${HTTP_BIND_ADDRESS:0.0.0.0}"
20   - # Server bind port
21   - port: "${HTTP_BIND_PORT:8085}"
22   - # Server SSL configuration
23   -
24 17 # Zookeeper connection parameters. Used for service discovery.
25 18 zk:
26 19 # Enable/disable zookeeper discovery service.
... ... @@ -36,146 +29,14 @@ zk:
36 29 # Name of the directory in zookeeper 'filesystem'
37 30 zk_dir: "${ZOOKEEPER_NODES_DIR:/thingsboard}"
38 31
39   -cluster:
40   - stats:
41   - enabled: "${TB_CLUSTER_STATS_ENABLED:false}"
42   - print_interval_ms: "${TB_CLUSTER_STATS_PRINT_INTERVAL_MS:10000}"
43   -
44   -cache:
45   - # caffeine or redis
46   - type: "${CACHE_TYPE:caffeine}"
47   - attributes:
48   - # make sure that if cache.type is 'redis' and cache.attributes.enabled is 'true' that you change 'maxmemory-policy' Redis config property to 'allkeys-lru', 'allkeys-lfu' or 'allkeys-random'
49   - enabled: "${CACHE_ATTRIBUTES_ENABLED:true}"
50   -
51   -caffeine:
52   - specs:
53   - relations:
54   - timeToLiveInMinutes: 1440
55   - maxSize: 0
56   - deviceCredentials:
57   - timeToLiveInMinutes: 1440
58   - maxSize: 0
59   - devices:
60   - timeToLiveInMinutes: 1440
61   - maxSize: 0
62   - sessions:
63   - timeToLiveInMinutes: 1440
64   - maxSize: 0
65   - assets:
66   - timeToLiveInMinutes: 1440
67   - maxSize: 0
68   - entityViews:
69   - timeToLiveInMinutes: 1440
70   - maxSize: 0
71   - claimDevices:
72   - timeToLiveInMinutes: 1
73   - maxSize: 0
74   - securitySettings:
75   - timeToLiveInMinutes: 1440
76   - maxSize: 0
77   - tenantProfiles:
78   - timeToLiveInMinutes: 1440
79   - maxSize: 0
80   - deviceProfiles:
81   - timeToLiveInMinutes: 1440
82   - maxSize: 0
83   - attributes:
84   - timeToLiveInMinutes: 1440
85   - maxSize: 100000
86   -
87   -redis:
88   - # standalone or cluster
89   - connection:
90   - type: "${REDIS_CONNECTION_TYPE:standalone}"
91   - standalone:
92   - host: "${REDIS_HOST:localhost}"
93   - port: "${REDIS_PORT:6379}"
94   - useDefaultClientConfig: "${REDIS_USE_DEFAULT_CLIENT_CONFIG:true}"
95   - # this value may be used only if you used not default ClientConfig
96   - clientName: "${REDIS_CLIENT_NAME:standalone}"
97   - # this value may be used only if you used not default ClientConfig
98   - connectTimeout: "${REDIS_CLIENT_CONNECT_TIMEOUT:30000}"
99   - # this value may be used only if you used not default ClientConfig
100   - readTimeout: "${REDIS_CLIENT_READ_TIMEOUT:60000}"
101   - # this value may be used only if you used not default ClientConfig
102   - usePoolConfig: "${REDIS_CLIENT_USE_POOL_CONFIG:false}"
103   - cluster:
104   - # Comma-separated list of "host:port" pairs to bootstrap from.
105   - nodes: "${REDIS_NODES:}"
106   - # Maximum number of redirects to follow when executing commands across the cluster.
107   - max-redirects: "${REDIS_MAX_REDIRECTS:12}"
108   - useDefaultPoolConfig: "${REDIS_USE_DEFAULT_POOL_CONFIG:true}"
109   - # db index
110   - db: "${REDIS_DB:0}"
111   - # db password
112   - password: "${REDIS_PASSWORD:}"
113   - # pool config
114   - pool_config:
115   - maxTotal: "${REDIS_POOL_CONFIG_MAX_TOTAL:128}"
116   - maxIdle: "${REDIS_POOL_CONFIG_MAX_IDLE:128}"
117   - minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
118   - testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
119   - testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
120   - testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
121   - minEvictableMs: "${REDIS_POOL_CONFIG_MIN_EVICTABLE_MS:60000}"
122   - evictionRunsMs: "${REDIS_POOL_CONFIG_EVICTION_RUNS_MS:30000}"
123   - maxWaitMills: "${REDIS_POOL_CONFIG_MAX_WAIT_MS:60000}"
124   - numberTestsPerEvictionRun: "${REDIS_POOL_CONFIG_NUMBER_TESTS_PER_EVICTION_RUN:3}"
125   - blockWhenExhausted: "${REDIS_POOL_CONFIG_BLOCK_WHEN_EXHAUSTED:true}"
126   -
127   -# Check new version updates parameters
128   -updates:
129   - # Enable/disable updates checking.
130   - enabled: "${UPDATES_ENABLED:true}"
131   -
132   -# spring freemarker configuration
133   -spring.freemarker.checkTemplateLocation: "false"
134   -
135   -audit-log:
136   - # Enable/disable audit log functionality.
137   - enabled: "${AUDIT_LOG_ENABLED:true}"
138   - # Specify partitioning size for audit log by tenant id storage. Example MINUTES, HOURS, DAYS, MONTHS
139   - by_tenant_partitioning: "${AUDIT_LOG_BY_TENANT_PARTITIONING:MONTHS}"
140   - # Number of days as history period if startTime and endTime are not specified
141   - default_query_period: "${AUDIT_LOG_DEFAULT_QUERY_PERIOD:30}"
142   - # Logging levels per each entity type.
143   - # Allowed values: OFF (disable), W (log write operations), RW (log read and write operations)
144   - logging-level:
145   - mask:
146   - "device": "${AUDIT_LOG_MASK_DEVICE:W}"
147   - "asset": "${AUDIT_LOG_MASK_ASSET:W}"
148   - "dashboard": "${AUDIT_LOG_MASK_DASHBOARD:W}"
149   - "customer": "${AUDIT_LOG_MASK_CUSTOMER:W}"
150   - "user": "${AUDIT_LOG_MASK_USER:W}"
151   - "rule_chain": "${AUDIT_LOG_MASK_RULE_CHAIN:W}"
152   - "alarm": "${AUDIT_LOG_MASK_ALARM:W}"
153   - "entity_view": "${AUDIT_LOG_MASK_ENTITY_VIEW:W}"
154   - "device_profile": "${AUDIT_LOG_MASK_DEVICE_PROFILE:W}"
155   - sink:
156   - # Type of external sink. possible options: none, elasticsearch
157   - type: "${AUDIT_LOG_SINK_TYPE:none}"
158   - # Name of the index where audit logs stored
159   - # Index name could contain next placeholders (not mandatory):
160   - # @{TENANT} - substituted by tenant ID
161   - # @{DATE} - substituted by current date in format provided in audit_log.sink.date_format
162   - index_pattern: "${AUDIT_LOG_SINK_INDEX_PATTERN:@{TENANT}_AUDIT_LOG_@{DATE}}"
163   - # Date format. Details of the pattern could be found here:
164   - # https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
165   - date_format: "${AUDIT_LOG_SINK_DATE_FORMAT:YYYY.MM.DD}"
166   - scheme_name: "${AUDIT_LOG_SINK_SCHEME_NAME:http}" # http or https
167   - host: "${AUDIT_LOG_SINK_HOST:localhost}"
168   - port: "${AUDIT_LOG_SINK_PORT:9200}"
169   - user_name: "${AUDIT_LOG_SINK_USER_NAME:}"
170   - password: "${AUDIT_LOG_SINK_PASSWORD:}"
171   -
172   -state:
173   - # Should be greater then transport.sessions.report_timeout
174   - defaultInactivityTimeoutInSec: "${DEFAULT_INACTIVITY_TIMEOUT:600}"
175   - defaultStateCheckIntervalInSec: "${DEFAULT_STATE_CHECK_INTERVAL:60}"
176   - persistToTelemetry: "${PERSIST_STATE_TO_TELEMETRY:false}"
177   -
178 32 transport:
  33 + snmp:
  34 + enabled: "${SNMP_ENABLED:true}"
  35 + response_processing:
  36 + # parallelism level for executor (workStealingPool) that is responsible for handling responses from SNMP devices
  37 + parallelism_level: "${SNMP_RESPONSE_PROCESSING_PARALLELISM_LEVEL:20}"
  38 + # to configure SNMP to work over UDP or TCP
  39 + underlying_protocol: "${SNMP_UNDERLYING_PROTOCOL:udp}"
179 40 sessions:
180 41 inactivity_timeout: "${TB_TRANSPORT_SESSIONS_INACTIVITY_TIMEOUT:300000}"
181 42 report_timeout: "${TB_TRANSPORT_SESSIONS_REPORT_TIMEOUT:30000}"
... ... @@ -184,23 +45,9 @@ transport:
184 45 type_cast_enabled: "${JSON_TYPE_CAST_ENABLED:true}"
185 46 # Maximum allowed string value length when processing Telemetry/Attributes JSON (0 value disables string value length check)
186 47 max_string_value_length: "${JSON_MAX_STRING_VALUE_LENGTH:0}"
187   - # Enable/disable http/mqtt/coap transport protocols (has higher priority than certain protocol's 'enabled' property)
188   - api_enabled: "${TB_TRANSPORT_API_ENABLED:true}"
189   - # Local LwM2M transport parameters
190   - snmp:
191   - enabled: "${SNMP_ENABLED:true}"
192   - response_processing:
193   - # parallelism level for executor (workStealingPool) that is responsible for handling responses from SNMP devices
194   - parallelism_level: "${SNMP_RESPONSE_PROCESSING_PARALLELISM_LEVEL:20}"
195   - # to configure SNMP to work over UDP or TCP
196   - underlying_protocol: "${SNMP_UNDERLYING_PROTOCOL:udp}"
197 48
198 49 queue:
199   - type: "${TB_QUEUE_TYPE:in-memory}" # in-memory or kafka (Apache Kafka) or aws-sqs (AWS SQS) or pubsub (PubSub) or service-bus (Azure Service Bus) or rabbitmq (RabbitMQ)
200   - in_memory:
201   - stats:
202   - # For debug lvl
203   - print-interval-ms: "${TB_QUEUE_IN_MEMORY_STATS_PRINT_INTERVAL_MS:60000}"
  50 + type: "${TB_QUEUE_TYPE:kafka}" # kafka (Apache Kafka) or aws-sqs (AWS SQS) or pubsub (PubSub) or service-bus (Azure Service Bus) or rabbitmq (RabbitMQ)
204 51 kafka:
205 52 bootstrap.servers: "${TB_KAFKA_SERVERS:localhost:9092}"
206 53 acks: "${TB_KAFKA_ACKS:all}"
... ... @@ -209,10 +56,6 @@ queue:
209 56 linger.ms: "${TB_KAFKA_LINGER_MS:1}"
210 57 buffer.memory: "${TB_BUFFER_MEMORY:33554432}"
211 58 replication_factor: "${TB_QUEUE_KAFKA_REPLICATION_FACTOR:1}"
212   - max_poll_interval_ms: "${TB_QUEUE_KAFKA_MAX_POLL_INTERVAL_MS:300000}"
213   - max_poll_records: "${TB_QUEUE_KAFKA_MAX_POLL_RECORDS:8192}"
214   - max_partition_fetch_bytes: "${TB_QUEUE_KAFKA_MAX_PARTITION_FETCH_BYTES:16777216}"
215   - fetch_max_bytes: "${TB_QUEUE_KAFKA_FETCH_MAX_BYTES:134217728}"
216 59 use_confluent_cloud: "${TB_QUEUE_KAFKA_USE_CONFLUENT_CLOUD:false}"
217 60 confluent:
218 61 ssl.algorithm: "${TB_QUEUE_KAFKA_CONFLUENT_SSL_ALGORITHM:https}"
... ... @@ -221,11 +64,11 @@ queue:
221 64 security.protocol: "${TB_QUEUE_KAFKA_CONFLUENT_SECURITY_PROTOCOL:SASL_SSL}"
222 65 other:
223 66 topic-properties:
224   - rule-engine: "${TB_QUEUE_KAFKA_RE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1}"
225   - core: "${TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1}"
226   - transport-api: "${TB_QUEUE_KAFKA_TA_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1}"
227   - notifications: "${TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1}"
228   - js-executor: "${TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:104857600;partitions:100}"
  67 + rule-engine: "${TB_QUEUE_KAFKA_RE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  68 + core: "${TB_QUEUE_KAFKA_CORE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  69 + transport-api: "${TB_QUEUE_KAFKA_TA_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  70 + notifications: "${TB_QUEUE_KAFKA_NOTIFICATIONS_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:1048576000;partitions:1;min.insync.replicas:1}"
  71 + js-executor: "${TB_QUEUE_KAFKA_JE_TOPIC_PROPERTIES:retention.ms:604800000;segment.bytes:26214400;retention.bytes:104857600;partitions:100;min.insync.replicas:1}"
229 72 consumer-stats:
230 73 enabled: "${TB_QUEUE_KAFKA_CONSUMER_STATS_ENABLED:true}"
231 74 print-interval-ms: "${TB_QUEUE_KAFKA_CONSUMER_STATS_MIN_PRINT_INTERVAL_MS:60000}"
... ... @@ -282,7 +125,8 @@ queue:
282 125 notifications: "${TB_QUEUE_RABBIT_MQ_NOTIFICATIONS_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
283 126 js-executor: "${TB_QUEUE_RABBIT_MQ_JE_QUEUE_PROPERTIES:x-max-length-bytes:1048576000;x-message-ttl:604800000}"
284 127 partitions:
285   - hash_function_name: "${TB_QUEUE_PARTITIONS_HASH_FUNCTION_NAME:murmur3_128}" # murmur3_32, murmur3_128 or sha256
  128 + hash_function_name: "${TB_QUEUE_PARTITIONS_HASH_FUNCTION_NAME:murmur3_128}"
  129 + virtual_nodes_size: "${TB_QUEUE_PARTITIONS_VIRTUAL_NODES_SIZE:16}"
286 130 transport_api:
287 131 requests_topic: "${TB_QUEUE_TRANSPORT_API_REQUEST_TOPIC:tb_transport.api.requests}"
288 132 responses_topic: "${TB_QUEUE_TRANSPORT_API_RESPONSE_TOPIC:tb_transport.api.responses}"
... ... @@ -295,11 +139,11 @@ queue:
295 139 topic: "${TB_QUEUE_CORE_TOPIC:tb_core}"
296 140 poll-interval: "${TB_QUEUE_CORE_POLL_INTERVAL_MS:25}"
297 141 partitions: "${TB_QUEUE_CORE_PARTITIONS:10}"
298   - pack-processing-timeout: "${TB_QUEUE_CORE_PACK_PROCESSING_TIMEOUT_MS:2000}"
  142 + pack-processing-timeout: "${TB_QUEUE_CORE_PACK_PROCESSING_TIMEOUT_MS:60000}"
299 143 usage-stats-topic: "${TB_QUEUE_US_TOPIC:tb_usage_stats}"
300 144 stats:
301   - enabled: "${TB_QUEUE_CORE_STATS_ENABLED:true}"
302   - print-interval-ms: "${TB_QUEUE_CORE_STATS_PRINT_INTERVAL_MS:60000}"
  145 + enabled: "${TB_QUEUE_CORE_STATS_ENABLED:false}"
  146 + print-interval-ms: "${TB_QUEUE_CORE_STATS_PRINT_INTERVAL_MS:10000}"
303 147 js:
304 148 # JS Eval request topic
305 149 request_topic: "${REMOTE_JS_EVAL_REQUEST_TOPIC:js_eval.requests}"
... ... @@ -308,15 +152,13 @@ queue:
308 152 # JS Eval max pending requests
309 153 max_pending_requests: "${REMOTE_JS_MAX_PENDING_REQUESTS:10000}"
310 154 # JS Eval max request timeout
311   - max_eval_requests_timeout: "${REMOTE_JS_MAX_EVAL_REQUEST_TIMEOUT:60000}"
312   - # JS max request timeout
313 155 max_requests_timeout: "${REMOTE_JS_MAX_REQUEST_TIMEOUT:10000}"
314 156 # JS response poll interval
315 157 response_poll_interval: "${REMOTE_JS_RESPONSE_POLL_INTERVAL_MS:25}"
316 158 rule-engine:
317 159 topic: "${TB_QUEUE_RULE_ENGINE_TOPIC:tb_rule_engine}"
318 160 poll-interval: "${TB_QUEUE_RULE_ENGINE_POLL_INTERVAL_MS:25}"
319   - pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:2000}"
  161 + pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
320 162 stats:
321 163 enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
322 164 print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:60000}"
... ... @@ -325,7 +167,7 @@ queue:
325 167 topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
326 168 poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
327 169 partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
328   - pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:2000}"
  170 + pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
329 171 submit-strategy:
330 172 type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
331 173 # For BATCH only
... ... @@ -336,12 +178,11 @@ queue:
336 178 retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
337 179 failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
338 180 pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRY_PAUSE:3}"# Time in seconds to wait in consumer thread before retries;
339   - max-pause-between-retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:3}"# Max allowed time in seconds for pause between retries.
340 181 - name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
341 182 topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
342 183 poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
343 184 partitions: "${TB_QUEUE_RE_HP_PARTITIONS:10}"
344   - pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:2000}"
  185 + pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
345 186 submit-strategy:
346 187 type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
347 188 # For BATCH only
... ... @@ -352,12 +193,11 @@ queue:
352 193 retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
353 194 failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
354 195 pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
355   - max-pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:5}"# Max allowed time in seconds for pause between retries.
356 196 - name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
357 197 topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
358 198 poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
359 199 partitions: "${TB_QUEUE_RE_SQ_PARTITIONS:10}"
360   - pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:2000}"
  200 + pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:60000}"
361 201 submit-strategy:
362 202 type: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_BY_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
363 203 # For BATCH only
... ... @@ -368,16 +208,11 @@ queue:
368 208 retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
369 209 failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
370 210 pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
371   - max-pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_MAX_RETRY_PAUSE:5}"# Max allowed time in seconds for pause between retries.
372 211 transport:
373 212 # For high priority notifications that require minimum latency and processing time
374 213 notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
375 214 poll_interval: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_POLL_INTERVAL_MS:25}"
376 215
377   -event:
378   - debug:
379   - max-symbols: "${TB_MAX_DEBUG_EVENT_SYMBOLS:4096}"
380   -
381 216 service:
382 217 type: "${TB_SERVICE_TYPE:tb-transport}"
383 218 # Unique id for this service (autogenerated if empty)
... ... @@ -387,13 +222,10 @@ service:
387 222 metrics:
388 223 # Enable/disable actuator metrics.
389 224 enabled: "${METRICS_ENABLED:false}"
390   - timer:
391   - # Metrics percentiles returned by actuator for timer metrics. List of double values (divided by ,).
392   - percentiles: "${METRICS_TIMER_PERCENTILES:0.5}"
393 225
394 226 management:
395 227 endpoints:
396 228 web:
397 229 exposure:
398 230 # Expose metrics endpoint (use value 'prometheus' to enable prometheus metrics).
399   - include: '${METRICS_ENDPOINTS_EXPOSE:info}'
  231 + include: '${METRICS_ENDPOINTS_EXPOSE:info}'
\ No newline at end of file
... ...