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.cassandra.CassandraCluster;
|
||||||
import org.thingsboard.server.dao.customer.CustomerService;
|
import org.thingsboard.server.dao.customer.CustomerService;
|
||||||
import org.thingsboard.server.dao.dashboard.DashboardService;
|
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.device.DeviceService;
|
||||||
import org.thingsboard.server.dao.entityview.EntityViewService;
|
import org.thingsboard.server.dao.entityview.EntityViewService;
|
||||||
import org.thingsboard.server.dao.event.EventService;
|
import org.thingsboard.server.dao.event.EventService;
|
||||||
@ -218,6 +219,10 @@ public class ActorSystemContext {
|
|||||||
@Getter
|
@Getter
|
||||||
private MailService mailService;
|
private MailService mailService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
@Getter
|
||||||
|
private ClaimDevicesService claimDevicesService;
|
||||||
|
|
||||||
//TODO: separate context for TbCore and TbRuleEngine
|
//TODO: separate context for TbCore and TbRuleEngine
|
||||||
@Autowired(required = false)
|
@Autowired(required = false)
|
||||||
@Getter
|
@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.queue.TbCallback;
|
||||||
import org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest;
|
import org.thingsboard.server.common.msg.rpc.ToDeviceRpcRequest;
|
||||||
import org.thingsboard.server.common.msg.timeout.DeviceActorServerSideRpcTimeoutMsg;
|
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.AttributeUpdateNotificationMsg;
|
||||||
import org.thingsboard.server.gen.transport.TransportProtos.DeviceSessionsCacheEntry;
|
import org.thingsboard.server.gen.transport.TransportProtos.DeviceSessionsCacheEntry;
|
||||||
import org.thingsboard.server.gen.transport.TransportProtos.GetAttributeRequestMsg;
|
import org.thingsboard.server.gen.transport.TransportProtos.GetAttributeRequestMsg;
|
||||||
@ -232,9 +233,17 @@ class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcessor {
|
|||||||
if (msg.hasSubscriptionInfo()) {
|
if (msg.hasSubscriptionInfo()) {
|
||||||
handleSessionActivity(context, msg.getSessionInfo(), msg.getSubscriptionInfo());
|
handleSessionActivity(context, msg.getSessionInfo(), msg.getSubscriptionInfo());
|
||||||
}
|
}
|
||||||
|
if (msg.hasClaimDevice()) {
|
||||||
|
handleClaimDeviceMsg(context, msg.getSessionInfo(), msg.getClaimDevice());
|
||||||
|
}
|
||||||
callback.onSuccess();
|
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() {
|
private void reportSessionOpen() {
|
||||||
systemContext.getDeviceStateService().onDeviceConnect(deviceId);
|
systemContext.getDeviceStateService().onDeviceConnect(deviceId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -131,6 +131,7 @@ public class DefaultSystemDataLoaderService implements SystemDataLoaderService {
|
|||||||
node.put("username", "");
|
node.put("username", "");
|
||||||
node.put("password", "");
|
node.put("password", "");
|
||||||
node.put("tlsVersion", "TLSv1.2");//NOSONAR, key used to identify password field (not password value itself)
|
node.put("tlsVersion", "TLSv1.2");//NOSONAR, key used to identify password field (not password value itself)
|
||||||
|
node.put("enableProxy", false);
|
||||||
mailSettings.setJsonValue(node);
|
mailSettings.setJsonValue(node);
|
||||||
adminSettingsService.saveAdminSettings(TenantId.SYS_TENANT_ID, mailSettings);
|
adminSettingsService.saveAdminSettings(TenantId.SYS_TENANT_ID, mailSettings);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -114,6 +114,21 @@ public class DefaultMailService implements MailService {
|
|||||||
javaMailProperties.put(MAIL_PROP + protocol + ".ssl.protocols", tlsVersion);
|
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;
|
return javaMailProperties;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,6 +46,9 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||||||
@Service
|
@Service
|
||||||
public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
||||||
|
|
||||||
|
@Value("${queue.js.max_eval_requests_timeout}")
|
||||||
|
private long maxEvalRequestsTimeout;
|
||||||
|
|
||||||
@Value("${queue.js.max_requests_timeout}")
|
@Value("${queue.js.max_requests_timeout}")
|
||||||
private long maxRequestsTimeout;
|
private long maxRequestsTimeout;
|
||||||
|
|
||||||
@ -59,22 +62,22 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
|||||||
@Value("${js.remote.stats.enabled:false}")
|
@Value("${js.remote.stats.enabled:false}")
|
||||||
private boolean statsEnabled;
|
private boolean statsEnabled;
|
||||||
|
|
||||||
private final AtomicInteger kafkaPushedMsgs = new AtomicInteger(0);
|
private final AtomicInteger queuePushedMsgs = new AtomicInteger(0);
|
||||||
private final AtomicInteger kafkaInvokeMsgs = new AtomicInteger(0);
|
private final AtomicInteger queueInvokeMsgs = new AtomicInteger(0);
|
||||||
private final AtomicInteger kafkaEvalMsgs = new AtomicInteger(0);
|
private final AtomicInteger queueEvalMsgs = new AtomicInteger(0);
|
||||||
private final AtomicInteger kafkaFailedMsgs = new AtomicInteger(0);
|
private final AtomicInteger queueFailedMsgs = new AtomicInteger(0);
|
||||||
private final AtomicInteger kafkaTimeoutMsgs = new AtomicInteger(0);
|
private final AtomicInteger queueTimeoutMsgs = new AtomicInteger(0);
|
||||||
|
|
||||||
@Scheduled(fixedDelayString = "${js.remote.stats.print_interval_ms}")
|
@Scheduled(fixedDelayString = "${js.remote.stats.print_interval_ms}")
|
||||||
public void printStats() {
|
public void printStats() {
|
||||||
if (statsEnabled) {
|
if (statsEnabled) {
|
||||||
int pushedMsgs = kafkaPushedMsgs.getAndSet(0);
|
int pushedMsgs = queuePushedMsgs.getAndSet(0);
|
||||||
int invokeMsgs = kafkaInvokeMsgs.getAndSet(0);
|
int invokeMsgs = queueInvokeMsgs.getAndSet(0);
|
||||||
int evalMsgs = kafkaEvalMsgs.getAndSet(0);
|
int evalMsgs = queueEvalMsgs.getAndSet(0);
|
||||||
int failed = kafkaFailedMsgs.getAndSet(0);
|
int failed = queueFailedMsgs.getAndSet(0);
|
||||||
int timedOut = kafkaTimeoutMsgs.getAndSet(0);
|
int timedOut = queueTimeoutMsgs.getAndSet(0);
|
||||||
if (pushedMsgs > 0 || invokeMsgs > 0 || evalMsgs > 0 || failed > 0 || timedOut > 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);
|
pushedMsgs, invokeMsgs + evalMsgs, invokeMsgs, evalMsgs, failed, timedOut);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -113,22 +116,22 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
|||||||
|
|
||||||
log.trace("Post compile request for scriptId [{}]", scriptId);
|
log.trace("Post compile request for scriptId [{}]", scriptId);
|
||||||
ListenableFuture<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>> future = requestTemplate.send(new TbProtoJsQueueMsg<>(UUID.randomUUID(), jsRequestWrapper));
|
ListenableFuture<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>> future = requestTemplate.send(new TbProtoJsQueueMsg<>(UUID.randomUUID(), jsRequestWrapper));
|
||||||
if (maxRequestsTimeout > 0) {
|
if (maxEvalRequestsTimeout > 0) {
|
||||||
future = Futures.withTimeout(future, maxRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
future = Futures.withTimeout(future, maxEvalRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
||||||
}
|
}
|
||||||
kafkaPushedMsgs.incrementAndGet();
|
queuePushedMsgs.incrementAndGet();
|
||||||
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
||||||
kafkaEvalMsgs.incrementAndGet();
|
queueEvalMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(Throwable t) {
|
||||||
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
||||||
kafkaTimeoutMsgs.incrementAndGet();
|
queueTimeoutMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
kafkaFailedMsgs.incrementAndGet();
|
queueFailedMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
}, MoreExecutors.directExecutor());
|
}, MoreExecutors.directExecutor());
|
||||||
return Futures.transform(future, response -> {
|
return Futures.transform(future, response -> {
|
||||||
@ -170,20 +173,20 @@ public class RemoteJsInvokeService extends AbstractJsInvokeService {
|
|||||||
if (maxRequestsTimeout > 0) {
|
if (maxRequestsTimeout > 0) {
|
||||||
future = Futures.withTimeout(future, maxRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
future = Futures.withTimeout(future, maxRequestsTimeout, TimeUnit.MILLISECONDS, timeoutExecutorService);
|
||||||
}
|
}
|
||||||
kafkaPushedMsgs.incrementAndGet();
|
queuePushedMsgs.incrementAndGet();
|
||||||
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
Futures.addCallback(future, new FutureCallback<TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse>>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
public void onSuccess(@Nullable TbProtoQueueMsg<JsInvokeProtos.RemoteJsResponse> result) {
|
||||||
kafkaInvokeMsgs.incrementAndGet();
|
queueInvokeMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable t) {
|
public void onFailure(Throwable t) {
|
||||||
onScriptExecutionError(scriptId);
|
onScriptExecutionError(scriptId);
|
||||||
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
if (t instanceof TimeoutException || (t.getCause() != null && t.getCause() instanceof TimeoutException)) {
|
||||||
kafkaTimeoutMsgs.incrementAndGet();
|
queueTimeoutMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
kafkaFailedMsgs.incrementAndGet();
|
queueFailedMsgs.incrementAndGet();
|
||||||
}
|
}
|
||||||
}, MoreExecutors.directExecutor());
|
}, MoreExecutors.directExecutor());
|
||||||
return Futures.transform(future, response -> {
|
return Futures.transform(future, response -> {
|
||||||
|
|||||||
@ -224,7 +224,7 @@ public class DefaultSubscriptionManagerService implements SubscriptionManagerSer
|
|||||||
return null;
|
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 -> {
|
s -> {
|
||||||
List<TsKvEntry> subscriptionUpdate = null;
|
List<TsKvEntry> subscriptionUpdate = null;
|
||||||
for (AttributeKvEntry kv : attributes) {
|
for (AttributeKvEntry kv : attributes) {
|
||||||
|
|||||||
@ -17,6 +17,6 @@ package org.thingsboard.server.service.subscription;
|
|||||||
|
|
||||||
public enum TbAttributeSubscriptionScope {
|
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));
|
keys.forEach(key -> subState.put(key, 0L));
|
||||||
attributesData.forEach(v -> subState.put(v.getKey(), v.getTs()));
|
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()
|
TbAttributeSubscription sub = TbAttributeSubscription.builder()
|
||||||
.serviceId(serviceId)
|
.serviceId(serviceId)
|
||||||
@ -442,7 +442,7 @@ public class DefaultTelemetryWebSocketService implements TelemetryWebSocketServi
|
|||||||
Map<String, Long> subState = new HashMap<>(attributesData.size());
|
Map<String, Long> subState = new HashMap<>(attributesData.size());
|
||||||
attributesData.forEach(v -> subState.put(v.getKey(), v.getTs()));
|
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()
|
TbAttributeSubscription sub = TbAttributeSubscription.builder()
|
||||||
.serviceId(serviceId)
|
.serviceId(serviceId)
|
||||||
|
|||||||
@ -668,6 +668,8 @@ queue:
|
|||||||
# JS Eval max pending requests
|
# JS Eval max pending requests
|
||||||
max_pending_requests: "${REMOTE_JS_MAX_PENDING_REQUESTS:10000}"
|
max_pending_requests: "${REMOTE_JS_MAX_PENDING_REQUESTS:10000}"
|
||||||
# JS Eval max request timeout
|
# 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}"
|
max_requests_timeout: "${REMOTE_JS_MAX_REQUEST_TIMEOUT:10000}"
|
||||||
# JS response poll interval
|
# JS response poll interval
|
||||||
response_poll_interval: "${REMOTE_JS_RESPONSE_POLL_INTERVAL_MS:25}"
|
response_poll_interval: "${REMOTE_JS_RESPONSE_POLL_INTERVAL_MS:25}"
|
||||||
|
|||||||
@ -19,10 +19,10 @@ version: '2.2'
|
|||||||
services:
|
services:
|
||||||
tb-js-executor:
|
tb-js-executor:
|
||||||
env_file:
|
env_file:
|
||||||
- queue-pubsub.env.env
|
- queue-pubsub.env
|
||||||
tb-core1:
|
tb-core1:
|
||||||
env_file:
|
env_file:
|
||||||
- queue-pubsub.env.env
|
- queue-pubsub.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- zookeeper
|
- zookeeper
|
||||||
- redis
|
- redis
|
||||||
|
|||||||
@ -100,7 +100,7 @@ function AwsSqsProducer() {
|
|||||||
const params = {
|
const params = {
|
||||||
MaxNumberOfMessages: 10,
|
MaxNumberOfMessages: 10,
|
||||||
QueueUrl: requestQueueURL,
|
QueueUrl: requestQueueURL,
|
||||||
WaitTimeSeconds: poolInterval / 1000
|
WaitTimeSeconds: pollInterval / 1000
|
||||||
};
|
};
|
||||||
while (!stopped) {
|
while (!stopped) {
|
||||||
let pollStartTs = new Date().getTime();
|
let pollStartTs = new Date().getTime();
|
||||||
|
|||||||
@ -68,9 +68,8 @@ function RabbitMqProducer() {
|
|||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
logger.info('Starting ThingsBoard JavaScript Executor Microservice...');
|
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) => {
|
connection = await new Promise((resolve, reject) => {
|
||||||
amqp.connect(url, function (err, connection) {
|
amqp.connect(url, function (err, connection) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|||||||
@ -147,6 +147,16 @@ public class TbSendEmailNode implements TbNode {
|
|||||||
if (this.config.isEnableTls() && StringUtils.isNoneEmpty(this.config.getTlsVersion())) {
|
if (this.config.isEnableTls() && StringUtils.isNoneEmpty(this.config.getTlsVersion())) {
|
||||||
javaMailProperties.put(MAIL_PROP + protocol + ".ssl.protocols", 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;
|
return javaMailProperties;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,6 +30,11 @@ public class TbSendEmailNodeConfiguration implements NodeConfiguration {
|
|||||||
private int timeout;
|
private int timeout;
|
||||||
private boolean enableTls;
|
private boolean enableTls;
|
||||||
private String tlsVersion;
|
private String tlsVersion;
|
||||||
|
private boolean enableProxy;
|
||||||
|
private String proxyHost;
|
||||||
|
private String proxyPort;
|
||||||
|
private String proxyUser;
|
||||||
|
private String proxyPassword;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TbSendEmailNodeConfiguration defaultConfiguration() {
|
public TbSendEmailNodeConfiguration defaultConfiguration() {
|
||||||
@ -41,6 +46,7 @@ public class TbSendEmailNodeConfiguration implements NodeConfiguration {
|
|||||||
configuration.setTimeout(10000);
|
configuration.setTimeout(10000);
|
||||||
configuration.setEnableTls(false);
|
configuration.setEnableTls(false);
|
||||||
configuration.setTlsVersion("TLSv1.2");
|
configuration.setTlsVersion("TLSv1.2");
|
||||||
|
configuration.setEnableProxy(false);
|
||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public class TbSynchronizationBeginNode implements TbNode {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMsg(TbContext ctx, TbMsg msg) {
|
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);
|
ctx.tellSuccess(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -49,7 +49,7 @@ public class TbSynchronizationEndNode implements TbNode {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMsg(TbContext ctx, TbMsg msg) {
|
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);
|
ctx.tellSuccess(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -155,19 +155,19 @@ queue:
|
|||||||
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
stats:
|
stats:
|
||||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
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:
|
queues:
|
||||||
- name: "Main"
|
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
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
|
# 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
|
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;
|
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}"
|
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
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}"
|
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
processing-strategy:
|
||||||
@ -187,6 +187,21 @@ queue:
|
|||||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
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;
|
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;
|
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:
|
transport:
|
||||||
# For high priority notifications that require minimum latency and processing time
|
# For high priority notifications that require minimum latency and processing time
|
||||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
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}"
|
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
stats:
|
stats:
|
||||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
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:
|
queues:
|
||||||
- name: "Main"
|
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
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
|
# 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
|
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;
|
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}"
|
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
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}"
|
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
processing-strategy:
|
||||||
@ -188,6 +188,21 @@ queue:
|
|||||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
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;
|
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;
|
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:
|
transport:
|
||||||
# For high priority notifications that require minimum latency and processing time
|
# For high priority notifications that require minimum latency and processing time
|
||||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
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}"
|
pack-processing-timeout: "${TB_QUEUE_RULE_ENGINE_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
stats:
|
stats:
|
||||||
enabled: "${TB_QUEUE_RULE_ENGINE_STATS_ENABLED:true}"
|
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:
|
queues:
|
||||||
- name: "Main"
|
- name: "${TB_QUEUE_RE_MAIN_QUEUE_NAME:Main}"
|
||||||
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
topic: "${TB_QUEUE_RE_MAIN_TOPIC:tb_rule_engine.main}"
|
||||||
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
poll-interval: "${TB_QUEUE_RE_MAIN_POLL_INTERVAL_MS:25}"
|
||||||
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
partitions: "${TB_QUEUE_RE_MAIN_PARTITIONS:10}"
|
||||||
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
pack-processing-timeout: "${TB_QUEUE_RE_MAIN_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_MAIN_SUBMIT_STRATEGY_BATCH_SIZE:1000}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
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
|
# 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
|
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;
|
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}"
|
- name: "${TB_QUEUE_RE_HP_QUEUE_NAME:HighPriority}"
|
||||||
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
topic: "${TB_QUEUE_RE_HP_TOPIC:tb_rule_engine.hp}"
|
||||||
poll-interval: "${TB_QUEUE_RE_HP_POLL_INTERVAL_MS:25}"
|
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}"
|
pack-processing-timeout: "${TB_QUEUE_RE_HP_PACK_PROCESSING_TIMEOUT_MS:60000}"
|
||||||
submit-strategy:
|
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
|
# For BATCH only
|
||||||
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
batch-size: "${TB_QUEUE_RE_HP_SUBMIT_STRATEGY_BATCH_SIZE:100}" # Maximum number of messages in batch
|
||||||
processing-strategy:
|
processing-strategy:
|
||||||
@ -208,6 +208,21 @@ queue:
|
|||||||
retries: "${TB_QUEUE_RE_HP_PROCESSING_STRATEGY_RETRIES:0}" # Number of retries, 0 is unlimited
|
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;
|
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;
|
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:
|
transport:
|
||||||
# For high priority notifications that require minimum latency and processing time
|
# For high priority notifications that require minimum latency and processing time
|
||||||
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
notifications_topic: "${TB_QUEUE_TRANSPORT_NOTIFICATIONS_TOPIC:tb_transport.notifications}"
|
||||||
|
|||||||
@ -90,6 +90,14 @@
|
|||||||
"timeout-invalid": "That doesn't look like a valid timeout.",
|
"timeout-invalid": "That doesn't look like a valid timeout.",
|
||||||
"enable-tls": "Enable TLS",
|
"enable-tls": "Enable TLS",
|
||||||
"tls-version": "TLS version",
|
"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",
|
"send-test-mail": "Send test mail",
|
||||||
"security-settings": "Security settings",
|
"security-settings": "Security settings",
|
||||||
"password-policy": "Password policy",
|
"password-policy": "Password policy",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user