Commit 30b0897e8712fc0b7f956061ee31633495037530

Authored by Igor Kulikov
1 parent 504158f9

Fix for TbMsg serialization error: '...TbMsgCallback cannot be serialized...'

@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 */ 15 */
16 package org.thingsboard.server.common.msg; 16 package org.thingsboard.server.common.msg;
17 17
  18 +import com.fasterxml.jackson.annotation.JsonIgnore;
18 import com.google.protobuf.ByteString; 19 import com.google.protobuf.ByteString;
19 import com.google.protobuf.InvalidProtocolBufferException; 20 import com.google.protobuf.InvalidProtocolBufferException;
20 import lombok.Builder; 21 import lombok.Builder;
@@ -51,6 +52,7 @@ public final class TbMsg implements Serializable { @@ -51,6 +52,7 @@ public final class TbMsg implements Serializable {
51 private final RuleChainId ruleChainId; 52 private final RuleChainId ruleChainId;
52 private final RuleNodeId ruleNodeId; 53 private final RuleNodeId ruleNodeId;
53 //This field is not serialized because we use queues and there is no need to do it 54 //This field is not serialized because we use queues and there is no need to do it
  55 + @JsonIgnore
54 transient private final TbMsgCallback callback; 56 transient private final TbMsgCallback callback;
55 57
56 public static TbMsg newMsg(String queueName, String type, EntityId originator, TbMsgMetaData metaData, String data, RuleChainId ruleChainId, RuleNodeId ruleNodeId) { 58 public static TbMsg newMsg(String queueName, String type, EntityId originator, TbMsgMetaData metaData, String data, RuleChainId ruleChainId, RuleNodeId ruleNodeId) {