From 550af81f9c6eb93df6515412ec6dc9907921f2f9 Mon Sep 17 00:00:00 2001 From: ShvaykaD Date: Thu, 28 Oct 2021 15:49:34 +0300 Subject: [PATCH] updated variable name in the TopicType enum: change Request to Response --- .../server/transport/mqtt/MqttTransportHandler.java | 2 +- .../java/org/thingsboard/server/transport/mqtt/TopicType.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java index df88e94671..61638052c0 100644 --- a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java +++ b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java @@ -965,7 +965,7 @@ public class MqttTransportHandler extends ChannelInboundHandlerAdapter implement @Override public void onGetAttributesResponse(TransportProtos.GetAttributeResponseMsg response) { log.trace("[{}] Received get attributes response", sessionId); - String topicBase = attrReqTopicType.getAttributesRequestTopicBase(); + String topicBase = attrReqTopicType.getAttributesResponseTopicBase(); MqttTransportAdaptor adaptor = deviceSessionCtx.getAdaptor(attrReqTopicType); try { adaptor.convertToPublish(deviceSessionCtx, response, topicBase).ifPresent(deviceSessionCtx.getChannel()::writeAndFlush); diff --git a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/TopicType.java b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/TopicType.java index 45a0030772..bd2e59a0df 100644 --- a/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/TopicType.java +++ b/common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/TopicType.java @@ -26,7 +26,7 @@ public enum TopicType { V2_PROTO(MqttTopics.DEVICE_ATTRIBUTES_RESPONSE_SHORT_PROTO_TOPIC_PREFIX, MqttTopics.DEVICE_ATTRIBUTES_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_REQUESTS_SHORT_PROTO_TOPIC, MqttTopics.DEVICE_RPC_RESPONSE_SHORT_PROTO_TOPIC); @Getter - private final String attributesRequestTopicBase; + private final String attributesResponseTopicBase; @Getter private final String attributesSubTopic; @@ -38,7 +38,7 @@ public enum TopicType { private final String rpcResponseTopicBase; TopicType(String attributesRequestTopicBase, String attributesSubTopic, String rpcRequestTopicBase, String rpcResponseTopicBase) { - this.attributesRequestTopicBase = attributesRequestTopicBase; + this.attributesResponseTopicBase = attributesRequestTopicBase; this.attributesSubTopic = attributesSubTopic; this.rpcRequestTopicBase = rpcRequestTopicBase; this.rpcResponseTopicBase = rpcResponseTopicBase;