Browse Source

Fix queue poll duration config ignored; 1 partition by default for isolated queues

pull/8988/head
ViacheslavKlimov 3 years ago
parent
commit
2fef3858a3
  1. 2
      application/src/main/java/org/thingsboard/server/service/queue/DefaultTbRuleEngineConsumerService.java
  2. 12
      ui-ngx/src/app/modules/home/components/profile/tenant-profile.component.ts

2
application/src/main/java/org/thingsboard/server/service/queue/DefaultTbRuleEngineConsumerService.java

@ -266,7 +266,7 @@ public class DefaultTbRuleEngineConsumerService extends AbstractConsumerService<
updateCurrentThreadName(threadSuffix);
while (!stopped && !consumer.isStopped()) {
try {
List<TbProtoQueueMsg<ToRuleEngineMsg>> msgs = consumer.poll(pollDuration);
List<TbProtoQueueMsg<ToRuleEngineMsg>> msgs = consumer.poll(configuration.getPollInterval());
if (msgs.isEmpty()) {
continue;
}

12
ui-ngx/src/app/modules/home/components/profile/tenant-profile.component.ts

@ -56,10 +56,10 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
const mainQueue = [
{
id: guid(),
consumerPerPartition: true,
consumerPerPartition: false,
name: 'Main',
packProcessingTimeout: 2000,
partitions: 10,
partitions: 1,
pollInterval: 25,
processingStrategy: {
failurePercentage: 0,
@ -82,8 +82,8 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
name: 'HighPriority',
topic: 'tb_rule_engine.hp',
pollInterval: 25,
partitions: 10,
consumerPerPartition: true,
partitions: 1,
consumerPerPartition: false,
packProcessingTimeout: 2000,
submitStrategy: {
type: 'BURST',
@ -105,8 +105,8 @@ export class TenantProfileComponent extends EntityComponent<TenantProfile> {
name: 'SequentialByOriginator',
topic: 'tb_rule_engine.sq',
pollInterval: 25,
partitions: 10,
consumerPerPartition: true,
partitions: 1,
consumerPerPartition: false,
packProcessingTimeout: 2000,
submitStrategy: {
type: 'SEQUENTIAL_BY_ORIGINATOR',

Loading…
Cancel
Save