Minor improvements
This commit is contained in:
parent
23cd7f0865
commit
aea4d267ff
@ -19,6 +19,7 @@ import lombok.Data;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.thingsboard.common.util.ThingsBoardExecutors;
|
||||||
import org.thingsboard.common.util.ThingsBoardThreadFactory;
|
import org.thingsboard.common.util.ThingsBoardThreadFactory;
|
||||||
import org.thingsboard.server.actors.ActorSystemContext;
|
import org.thingsboard.server.actors.ActorSystemContext;
|
||||||
import org.thingsboard.server.common.stats.StatsFactory;
|
import org.thingsboard.server.common.stats.StatsFactory;
|
||||||
@ -76,7 +77,7 @@ public class TbRuleEngineConsumerContext {
|
|||||||
@PostConstruct
|
@PostConstruct
|
||||||
void init() {
|
void init() {
|
||||||
this.consumersExecutor = Executors.newCachedThreadPool(ThingsBoardThreadFactory.forName("tb-rule-engine-consumer"));
|
this.consumersExecutor = Executors.newCachedThreadPool(ThingsBoardThreadFactory.forName("tb-rule-engine-consumer"));
|
||||||
this.mgmtExecutor = Executors.newFixedThreadPool(mgmtThreadPoolSize, ThingsBoardThreadFactory.forName("tb-rule-engine-mgmt"));
|
this.mgmtExecutor = ThingsBoardExecutors.newWorkStealingPool(mgmtThreadPoolSize, "tb-rule-engine-mgmt");
|
||||||
this.scheduler = Executors.newSingleThreadScheduledExecutor(ThingsBoardThreadFactory.forName("tb-rule-engine-consumer-scheduler"));
|
this.scheduler = Executors.newSingleThreadScheduledExecutor(ThingsBoardThreadFactory.forName("tb-rule-engine-consumer-scheduler"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -56,7 +56,7 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
|
|||||||
const mainQueue = [
|
const mainQueue = [
|
||||||
{
|
{
|
||||||
id: guid(),
|
id: guid(),
|
||||||
consumerPerPartition: true,
|
consumerPerPartition: false,
|
||||||
name: 'Main',
|
name: 'Main',
|
||||||
packProcessingTimeout: 10000,
|
packProcessingTimeout: 10000,
|
||||||
partitions: 1,
|
partitions: 1,
|
||||||
@ -84,7 +84,7 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
|
|||||||
topic: 'tb_rule_engine.hp',
|
topic: 'tb_rule_engine.hp',
|
||||||
pollInterval: 2000,
|
pollInterval: 2000,
|
||||||
partitions: 1,
|
partitions: 1,
|
||||||
consumerPerPartition: true,
|
consumerPerPartition: false,
|
||||||
packProcessingTimeout: 10000,
|
packProcessingTimeout: 10000,
|
||||||
submitStrategy: {
|
submitStrategy: {
|
||||||
type: 'BURST',
|
type: 'BURST',
|
||||||
@ -108,7 +108,7 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
|
|||||||
topic: 'tb_rule_engine.sq',
|
topic: 'tb_rule_engine.sq',
|
||||||
pollInterval: 2000,
|
pollInterval: 2000,
|
||||||
partitions: 1,
|
partitions: 1,
|
||||||
consumerPerPartition: true,
|
consumerPerPartition: false,
|
||||||
packProcessingTimeout: 10000,
|
packProcessingTimeout: 10000,
|
||||||
submitStrategy: {
|
submitStrategy: {
|
||||||
type: 'SEQUENTIAL_BY_ORIGINATOR',
|
type: 'SEQUENTIAL_BY_ORIGINATOR',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user