Browse Source

Renaming

pull/15665/head
Andrii Landiak 4 months ago
parent
commit
721a2f0058
  1. 4
      application/src/main/java/org/thingsboard/server/service/entitiy/queue/DefaultTbQueueService.java

4
application/src/main/java/org/thingsboard/server/service/entitiy/queue/DefaultTbQueueService.java

@ -175,10 +175,10 @@ public class DefaultTbQueueService extends AbstractTbEntityService implements Tb
private void createTopicsIfNeeded(Queue queue, Queue oldQueue) { private void createTopicsIfNeeded(Queue queue, Queue oldQueue) {
int newPartitions = queue.getPartitions(); int newPartitions = queue.getPartitions();
int oldPartitions = oldQueue != null ? oldQueue.getPartitions() : 0; int oldPartitions = oldQueue != null ? oldQueue.getPartitions() : 0;
String prefixedTopic = topicService.buildTopicName(queue.getTopic()); String topic = topicService.buildTopicName(queue.getTopic());
for (int i = oldPartitions; i < newPartitions; i++) { for (int i = oldPartitions; i < newPartitions; i++) {
tbQueueAdmin.createTopicIfNotExists( tbQueueAdmin.createTopicIfNotExists(
new TopicPartitionInfo(prefixedTopic, queue.getTenantId(), i, false).getFullTopicName(), new TopicPartitionInfo(topic, queue.getTenantId(), i, false).getFullTopicName(),
queue.getCustomProperties(), queue.getCustomProperties(),
true); // forcing topic creation because the topic may still be cached on some nodes true); // forcing topic creation because the topic may still be cached on some nodes
} }

Loading…
Cancel
Save