Browse Source

updated variable name in the TopicType enum: change Request to Response

pull/5441/head
ShvaykaD 5 years ago
parent
commit
550af81f9c
  1. 2
      common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/MqttTransportHandler.java
  2. 4
      common/transport/mqtt/src/main/java/org/thingsboard/server/transport/mqtt/TopicType.java

2
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);

4
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;

Loading…
Cancel
Save