Merge fixes from 2.5.1
This commit is contained in:
commit
d6ea7c30be
@ -56,6 +56,7 @@ import org.thingsboard.server.dao.audit.AuditLogService;
|
||||
import org.thingsboard.server.dao.cassandra.CassandraCluster;
|
||||
import org.thingsboard.server.dao.customer.CustomerService;
|
||||
import org.thingsboard.server.dao.dashboard.DashboardService;
|
||||
import org.thingsboard.server.dao.device.ClaimDevicesService;
|
||||
import org.thingsboard.server.dao.device.DeviceService;
|
||||
import org.thingsboard.server.dao.entityview.EntityViewService;
|
||||
import org.thingsboard.server.dao.event.EventService;
|
||||
@ -218,6 +219,10 @@ public class ActorSystemContext {
|
||||
@Getter
|
||||
private MailService mailService;
|
||||
|
||||
@Autowired
|
||||
@Getter
|
||||
private ClaimDevicesService claimDevicesService;
|
||||
|
||||
//TODO: separate context for TbCore and TbRuleEngine
|
||||
@Autowired(required = false)
|
||||
@Getter
|
||||
|
||||
@ -39,6 +39,7 @@ import org.thingsboard.server.common.msg.TbMsgMetaData;
|
||||
import org.thingsboard.server.common.msg.queue.TbCallback;
|
||||
import org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest;
|
||||
import org.thingsboard.server.common.msg.timeout.DeviceActorServerSideRpcTimeoutMsg;
|
||||
import org.thingsboard.server.gen.transport.TransportProtos;
|
||||
import org.thingsboard.server.gen.transport.TransportProtos.AttributeUpdateNotificationMsg;
|
||||
import org.thingsboard.server.gen.transport.TransportProtos.DeviceSessionsCacheEntry;
|
||||
import org.thingsboard.server.gen.transport.TransportProtos.GetAttributeRequestMsg;
|
||||
@ -232,9 +233,17 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor {
|
||||
if (msg.hasSubscriptionInfo()) {
|
||||
handleSessionActivity(context, msg.getSessionInfo(), msg.getSubscriptionInfo());
|
||||
}
|
||||
if (msg.hasClaimDevice()) {
|
||||
handleClaimDeviceMsg(context, msg.getSessionInfo(), msg.getClaimDevice());
|
||||
}
|
||||
callback.onSuccess();
|
||||
}
|
||||
|
||||
private void handleClaimDeviceMsg(ActorContext context, SessionInfoProto sessionInfo, TransportProtos.ClaimDeviceMsg msg) {
|
||||
DeviceId deviceId = new DeviceId(new UUID(msg.getDeviceIdMSB(), msg.getDeviceIdLSB()));
|
||||
systemContext.getClaimDevicesService().registerClaimingInfo(tenantId, deviceId, msg.getSecretKey(), msg.getDurationMs());
|
||||
}
|
||||
|
||||
private void reportSessionOpen() {
|
||||
systemContext.getDeviceStateService().onDeviceConnect(deviceId);
|
||||
}
|
||||
|
||||
@ -131,6 +131,7 @@ public class DefaultSystemDataLoaderService implements SystemDataLoaderService {
|
||||
node.put("username", "");
|
||||
node.put("password", "");
|
||||
node.put("tlsVersion", "TLSv1.2");//NOSONAR, key used to identify password field (not password value itself)
|
||||
node.put("enableProxy", false);
|
||||
mailSettings.setJsonValue(node);
|
||||
adminSettingsService.saveAdminSettings(TenantId.SYS_TENANT_ID, mailSettings);
|
||||
}
|
||||
|
||||
@ -114,6 +114,21 @@ public class DefaultMailService implements MailService {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".ssl.protocols", tlsVersion);
|
||||
}
|
||||
}
|
||||
|
||||
boolean enableProxy = jsonConfig.has("enableProxy") && jsonConfig.get("enableProxy").asBoolean();
|
||||
|
||||
if (enableProxy) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.host", jsonConfig.get("proxyHost").asText());
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.port", jsonConfig.get("proxyPort").asText());
|
||||
String proxyUser = jsonConfig.get("proxyUser").asText();
|
||||
if (StringUtils.isNoneEmpty(proxyUser)) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.user", proxyUser);
|
||||
}
|
||||
String proxyPassword = jsonConfig.get("proxyPassword").asText();
|
||||
if (StringUtils.isNoneEmpty(proxyPassword)) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.password", proxyPassword);
|
||||
}
|
||||
}
|
||||
return javaMailProperties;
|
||||
}
|
||||
|
||||
|
||||
@ -46,6 +46,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||
@Service
|
||||
public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||
|
||||
@Value("${queue.js.max_eval_requests_timeout}")
|
||||
private long maxEvalRequestsTimeout;
|
||||
|
||||
@Value("${queue.js.max_requests_timeout}")
|
||||
private long maxRequestsTimeout;
|
||||
|
||||
@ -59,22 +62,22 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||
@Value("${js.remote.stats.enabled:false}")
|
||||
private boolean statsEnabled;
|
||||
|
||||
private final AtomicInteger kafkaPushedMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger kafkaInvokeMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger kafkaEvalMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger kafkaFailedMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger kafkaTimeoutMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger queuePushedMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger queueInvokeMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger queueEvalMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger queueFailedMsgs = new AtomicInteger(0);
|
||||
private final AtomicInteger queueTimeoutMsgs = new AtomicInteger(0);
|
||||
|
||||
@Scheduled(fixedDelayString = "${js.remote.stats.print_interval_ms}")
|
||||
public void printStats() {
|
||||
if (statsEnabled) {
|
||||
int pushedMsgs = kafkaPushedMsgs.getAndSet(0);
|
||||
int invokeMsgs = kafkaInvokeMsgs.getAndSet(0);
|
||||
int evalMsgs = kafkaEvalMsgs.getAndSet(0);
|
||||
int failed = kafkaFailedMsgs.getAndSet(0);
|
||||
int timedOut = kafkaTimeoutMsgs.getAndSet(0);
|
||||
int pushedMsgs = queuePushedMsgs.getAndSet(0);
|
||||
int invokeMsgs = queueInvokeMsgs.getAndSet(0);
|
||||
int evalMsgs = queueEvalMsgs.getAndSet(0);
|
||||
int failed = queueFailedMsgs.getAndSet(0);
|
||||
int timedOut = queueTimeoutMsgs.getAndSet(0);
|
||||
if (pushedMsgs > 0 || invokeMsgs > 0 || evalMsgs > 0 || failed > 0 || timedOut > 0) {
|
||||
log.info("Kafka JS Invoke Stats: pushed [{}] received [{}] invoke [{}] eval [{}] failed [{}] timedOut [{}]",
|
||||
log.info("Queue JS Invoke Stats: pushed [{}] received [{}] invoke [{}] eval [{}] failed [{}] timedOut [{}]",
|
||||
pushedMsgs, invokeMsgs + evalMsgs, invokeMsgs, evalMsgs, failed, timedOut);
|
||||
}
|
||||
}
|
||||
@ -113,22 +116,22 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||
|
||||
log.trace("Post compile request for scriptId [{}]", scriptId);
|
||||
ListenableFuture<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>> future = requestTemplate.send(new TbProtoJsQueueMsg<>(UUID.randomUUID(), jsRequestWrapper));
|
||||
if (maxRequestsTimeout > 0) {
|
||||
future = Futures.withTimeout(future, maxRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
||||
if (maxEvalRequestsTimeout > 0) {
|
||||
future = Futures.withTimeout(future, maxEvalRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
||||
}
|
||||
kafkaPushedMsgs.incrementAndGet();
|
||||
queuePushedMsgs.incrementAndGet();
|
||||
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
||||
kafkaEvalMsgs.incrementAndGet();
|
||||
queueEvalMsgs.incrementAndGet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
||||
kafkaTimeoutMsgs.incrementAndGet();
|
||||
queueTimeoutMsgs.incrementAndGet();
|
||||
}
|
||||
kafkaFailedMsgs.incrementAndGet();
|
||||
queueFailedMsgs.incrementAndGet();
|
||||
}
|
||||
}, MoreExecutors.directExecutor());
|
||||
return Futures.transform(future, response -> {
|
||||
@ -170,20 +173,20 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||
if (maxRequestsTimeout > 0) {
|
||||
future = Futures.withTimeout(future, maxRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
||||
}
|
||||
kafkaPushedMsgs.incrementAndGet();
|
||||
queuePushedMsgs.incrementAndGet();
|
||||
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
||||
@Override
|
||||
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
||||
kafkaInvokeMsgs.incrementAndGet();
|
||||
queueInvokeMsgs.incrementAndGet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailure(Throwable t) {
|
||||
onScriptExecutionError(scriptId);
|
||||
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
||||
kafkaTimeoutMsgs.incrementAndGet();
|
||||
queueTimeoutMsgs.incrementAndGet();
|
||||
}
|
||||
kafkaFailedMsgs.incrementAndGet();
|
||||
queueFailedMsgs.incrementAndGet();
|
||||
}
|
||||
}, MoreExecutors.directExecutor());
|
||||
return Futures.transform(future, response -> {
|
||||
|
||||
@ -224,7 +224,7 @@ public class DefaultSubscriptionManagerService implements SubscriptionManagerSer
|
||||
return null;
|
||||
}
|
||||
},
|
||||
s -> (StringUtils.isEmpty(s.getScope()) || scope.equals(s.getScope().name())),
|
||||
s -> (TbAttributeSubscriptionScope.ANY_SCOPE.equals(s.getScope()) || scope.equals(s.getScope().name())),
|
||||
s -> {
|
||||
List<TsKvEntry> subscriptionUpdate = null;
|
||||
for (AttributeKvEntry kv : attributes) {
|
||||
|
||||
@ -17,6 +17,6 @@ package org.thingsboard.server.service.subscription;
|
||||
|
||||
public enum TbAttributeSubscriptionScope {
|
||||
|
||||
CLIENT_SCOPE, SHARED_SCOPE, SERVER_SCOPE
|
||||
ANY_SCOPE, CLIENT_SCOPE, SHARED_SCOPE, SERVER_SCOPE
|
||||
|
||||
}
|
||||
|
||||
@ -345,7 +345,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi
|
||||
keys.forEach(key -> subState.put(key, 0L));
|
||||
attributesData.forEach(v -> subState.put(v.getKey(), v.getTs()));
|
||||
|
||||
TbAttributeSubscriptionScope scope = StringUtils.isEmpty(cmd.getScope()) ? TbAttributeSubscriptionScope.SERVER_SCOPE : TbAttributeSubscriptionScope.valueOf(cmd.getScope());
|
||||
TbAttributeSubscriptionScope scope = StringUtils.isEmpty(cmd.getScope()) ? TbAttributeSubscriptionScope.ANY_SCOPE : TbAttributeSubscriptionScope.valueOf(cmd.getScope());
|
||||
|
||||
TbAttributeSubscription sub = TbAttributeSubscription.builder()
|
||||
.serviceId(serviceId)
|
||||
@ -442,7 +442,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi
|
||||
Map<String, Long> subState = new HashMap<>(attributesData.size());
|
||||
attributesData.forEach(v -> subState.put(v.getKey(), v.getTs()));
|
||||
|
||||
TbAttributeSubscriptionScope scope = StringUtils.isEmpty(cmd.getScope()) ? TbAttributeSubscriptionScope.SERVER_SCOPE : TbAttributeSubscriptionScope.valueOf(cmd.getScope());
|
||||
TbAttributeSubscriptionScope scope = StringUtils.isEmpty(cmd.getScope()) ? TbAttributeSubscriptionScope.ANY_SCOPE : TbAttributeSubscriptionScope.valueOf(cmd.getScope());
|
||||
|
||||
TbAttributeSubscription sub = TbAttributeSubscription.builder()
|
||||
.serviceId(serviceId)
|
||||
|
||||
@ -668,6 +668,8 @@ queue:
|
||||
# JS Eval max pending requests
|
||||
max_pending_requests: "${REMOTE_JS_MAX_PENDING_REQUESTS:10000}"
|
||||
# JS Eval max request timeout
|
||||
max_eval_requests_timeout: "${REMOTE_JS_MAX_EVAL_REQUEST_TIMEOUT:60000}"
|
||||
# JS max request timeout
|
||||
max_requests_timeout: "${REMOTE_JS_MAX_REQUEST_TIMEOUT:10000}"
|
||||
# JS response poll interval
|
||||
response_poll_interval: "${REMOTE_JS_RESPONSE_POLL_INTERVAL_MS:25}"
|
||||
|
||||
@ -19,10 +19,10 @@ version: '2.2'
|
||||
services:
|
||||
tb-js-executor:
|
||||
env_file:
|
||||
- queue-pubsub.env.env
|
||||
- queue-pubsub.env
|
||||
tb-core1:
|
||||
env_file:
|
||||
- queue-pubsub.env.env
|
||||
- queue-pubsub.env
|
||||
depends_on:
|
||||
- zookeeper
|
||||
- redis
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
TB_QUEUE_TYPE=pubsub
|
||||
TB_QUEUE_PUBSUB_PROJECT_ID=YOUR_PROJECT_ID
|
||||
TB_QUEUE_PUBSUB_SERVICE_ACCOUNT=YOUR_SERVICE_ACCOUNT
|
||||
TB_QUEUE_PUBSUB_SERVICE_ACCOUNT=YOUR_SERVICE_ACCOUNT
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
TB_QUEUE_TYPE=service-bus
|
||||
TB_QUEUE_SERVICE_BUS_NAMESPACE_NAME=YOUR_NAMESPACE_NAME
|
||||
TB_QUEUE_SERVICE_BUS_SAS_KEY_NAME=YOUR_SAS_KEY_NAME
|
||||
TB_QUEUE_SERVICE_BUS_SAS_KEY=YOUR_SAS_KEY
|
||||
TB_QUEUE_SERVICE_BUS_SAS_KEY=YOUR_SAS_KEY
|
||||
|
||||
@ -100,7 +100,7 @@ function AwsSqsProducer() {
|
||||
const params = {
|
||||
MaxNumberOfMessages: 10,
|
||||
QueueUrl: requestQueueURL,
|
||||
WaitTimeSeconds: poolInterval / 1000
|
||||
WaitTimeSeconds: pollInterval / 1000
|
||||
};
|
||||
while (!stopped) {
|
||||
let pollStartTs = new Date().getTime();
|
||||
|
||||
@ -68,9 +68,8 @@ function RabbitMqProducer() {
|
||||
(async () => {
|
||||
try {
|
||||
logger.info('Starting ThingsBoard JavaScript Executor Microservice...');
|
||||
const url = `amqp://${host}:${port}${vhost}`;
|
||||
const url = `amqp://${username}:${password}@${host}:${port}${vhost}`;
|
||||
|
||||
amqp.credentials.amqplain(username, password);
|
||||
connection = await new Promise((resolve, reject) => {
|
||||
amqp.connect(url, function (err, connection) {
|
||||
if (err) {
|
||||
|
||||
@ -147,6 +147,16 @@ public class TbSendEmailNode implements TbNode {
|
||||
if (this.config.isEnableTls() && StringUtils.isNoneEmpty(this.config.getTlsVersion())) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".ssl.protocols", this.config.getTlsVersion());
|
||||
}
|
||||
if (this.config.isEnableProxy()) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.host", config.getProxyHost());
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.port", config.getProxyPort());
|
||||
if (StringUtils.isNoneEmpty(config.getProxyUser())) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.user", config.getProxyUser());
|
||||
}
|
||||
if (StringUtils.isNoneEmpty(config.getProxyPassword())) {
|
||||
javaMailProperties.put(MAIL_PROP + protocol + ".proxy.password", config.getProxyPassword());
|
||||
}
|
||||
}
|
||||
return javaMailProperties;
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,6 +30,11 @@ public class TbSendEmailNodeConfiguration implements NodeConfiguration {
|
||||
private int timeout;
|
||||
private boolean enableTls;
|
||||
private String tlsVersion;
|
||||
private boolean enableProxy;
|
||||
private String proxyHost;
|
||||
private String proxyPort;
|
||||
private String proxyUser;
|
||||
private String proxyPassword;
|
||||
|
||||
@Override
|
||||
public TbSendEmailNodeConfiguration defaultConfiguration() {
|
||||
@ -41,6 +46,7 @@ public class TbSendEmailNodeConfiguration implements NodeConfiguration {
|
||||
configuration.setTimeout(10000);
|
||||
configuration.setEnableTls(false);
|
||||
configuration.setTlsVersion("TLSv1.2");
|
||||
configuration.setEnableProxy(false);
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
|
||||
@ -48,7 +48,7 @@ public class TbSynchronizationBeginNode implements TbNode {
|
||||
|
||||
@Override
|
||||
public void onMsg(TbContext ctx, TbMsg msg) {
|
||||
log.warn("Synchronization Start/End nodes are deprecated since TB 2.5. Use queue with submit strategy SEQUENTIAL_WITHIN_ORIGINATOR instead.");
|
||||
log.warn("Synchronization Start/End nodes are deprecated since TB 2.5. Use queue with submit strategy SEQUENTIAL_BY_ORIGINATOR instead.");
|
||||
ctx.tellSuccess(msg);
|
||||
}
|
||||
|
||||
|
||||
@ -49,7 +49,7 @@ public class TbSynchronizationEndNode implements TbNode {
|
||||
|
||||
@Override
|
||||
public void onMsg(TbContext ctx, TbMsg msg) {
|
||||
log.warn("Synchronization Start/End nodes are deprecated since TB 2.5. Use queue with submit strategy SEQUENTIAL_WITHIN_ORIGINATOR instead.");
|
||||
log.warn("Synchronization Start/End nodes are deprecated since TB 2.5. Use queue with submit strategy SEQUENTIAL_BY_ORIGINATOR instead.");
|
||||
ctx.tellSuccess(msg);
|
||||
}
|
||||
|
||||
|
||||
@ -155,19 +155,19 @@ queue:
|
||||
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
stats:
|
||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:10000}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:60000}"
|
||||
queues:
|
||||
- name: "Main"
|
||||
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:SKIP_ALL_FAILURES}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
@ -175,10 +175,10 @@ queue:
|
||||
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:3}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_WITHIN_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
@ -187,6 +187,21 @@ queue:
|
||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
- name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
|
||||
topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
|
||||
poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_SQ_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_BY_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
transport:
|
||||
# For high priority notifications that require minimum latency and processing time
|
||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
||||
|
||||
@ -156,19 +156,19 @@ queue:
|
||||
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
stats:
|
||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:10000}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:60000}"
|
||||
queues:
|
||||
- name: "Main"
|
||||
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:SKIP_ALL_FAILURES}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
@ -176,10 +176,10 @@ queue:
|
||||
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:3}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_WITHIN_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
@ -188,6 +188,21 @@ queue:
|
||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
- name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
|
||||
topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
|
||||
poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_SQ_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_BY_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
transport:
|
||||
# For high priority notifications that require minimum latency and processing time
|
||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
||||
|
||||
@ -176,19 +176,19 @@ queue:
|
||||
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
stats:
|
||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:10000}"
|
||||
print-interval-ms: "${TB_QUEUE_RULE_ENGINE_STATS_PRINT_INTERVAL_MS:60000}"
|
||||
queues:
|
||||
- name: "Main"
|
||||
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
type: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_TYPE:SKIP_ALL_FAILURES}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_MAIN_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
@ -196,10 +196,10 @@ queue:
|
||||
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:3}"
|
||||
partitions: "${TB_QUEUE_RE_HP_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_WITHIN_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_WITHIN_ORIGINATOR, SEQUENTIAL_WITHIN_TENANT, SEQUENTIAL
|
||||
type: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_TYPE:BURST}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
@ -208,6 +208,21 @@ queue:
|
||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
- name: "${TB_QUEUE_RE_SQ_QUEUE_NAME:SequentialByOriginator}"
|
||||
topic: "${TB_QUEUE_RE_SQ_TOPIC:tb_rule_engine.sq}"
|
||||
poll-interval: "${TB_QUEUE_RE_SQ_POLL_INTERVAL_MS:25}"
|
||||
partitions: "${TB_QUEUE_RE_SQ_PARTITIONS:10}"
|
||||
pack-processing-timeout: "${TB_QUEUE_RE_SQ_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||
submit-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_TYPE:SEQUENTIAL_BY_ORIGINATOR}" # BURST, BATCH, SEQUENTIAL_BY_ORIGINATOR, SEQUENTIAL_BY_TENANT, SEQUENTIAL
|
||||
# For BATCH only
|
||||
batch-size: "${TB_QUEUE_RE_SQ_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||
processing-strategy:
|
||||
type: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_TYPE:RETRY_FAILED_AND_TIMED_OUT}" # SKIP_ALL_FAILURES, RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
# For RETRY_ALL, RETRY_FAILED, RETRY_TIMED_OUT, RETRY_FAILED_AND_TIMED_OUT
|
||||
retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRIES:3}" # Number of retries, 0 is unlimited
|
||||
failure-percentage: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_FAILURE_PERCENTAGE:0}" # Skip retry if failures or timeouts are less then X percentage of messages;
|
||||
pause-between-retries: "${TB_QUEUE_RE_SQ_PROCESSING_STRATEGY_RETRY_PAUSE:5}"# Time in seconds to wait in consumer thread before retries;
|
||||
transport:
|
||||
# For high priority notifications that require minimum latency and processing time
|
||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
||||
|
||||
@ -90,6 +90,14 @@
|
||||
"timeout-invalid": "That doesn't look like a valid timeout.",
|
||||
"enable-tls": "Enable TLS",
|
||||
"tls-version": "TLS version",
|
||||
"enable-proxy": "Enable proxy",
|
||||
"proxy-host": "Proxy host",
|
||||
"proxy-host-required": "Proxy host is required.",
|
||||
"proxy-port": "Proxy port",
|
||||
"proxy-port-required": "You must supply a proxy port.",
|
||||
"proxy-port-invalid": "That doesn't look like a valid proxy port.",
|
||||
"proxy-user": "Proxy user",
|
||||
"proxy-password": "Proxy password",
|
||||
"send-test-mail": "Send test mail",
|
||||
"security-settings": "Security settings",
|
||||
"password-policy": "Password policy",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user