From 30b0897e8712fc0b7f956061ee31633495037530 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 12 Aug 2020 09:56:29 +0300 Subject: [PATCH] Fix for TbMsg serialization error: '...TbMsgCallback cannot be serialized...' --- .../src/main/java/org/thingsboard/server/common/msg/TbMsg.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/message/src/main/java/org/thingsboard/server/common/msg/TbMsg.java b/common/message/src/main/java/org/thingsboard/server/common/msg/TbMsg.java index 43c3294e5c..23710cc5ea 100644 --- a/common/message/src/main/java/org/thingsboard/server/common/msg/TbMsg.java +++ b/common/message/src/main/java/org/thingsboard/server/common/msg/TbMsg.java @@ -15,6 +15,7 @@ */ package org.thingsboard.server.common.msg; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.google.protobuf.ByteString; import com.google.protobuf.InvalidProtocolBufferException; import lombok.Builder; @@ -51,6 +52,7 @@ public final class TbMsg implements Serializable { private final RuleChainId ruleChainId; private final RuleNodeId ruleNodeId; //This field is not serialized because we use queues and there is no need to do it + @JsonIgnore transient private final TbMsgCallback callback; public static TbMsg newMsg(String queueName, String type, EntityId originator, TbMsgMetaData metaData, String data, RuleChainId ruleChainId, RuleNodeId ruleNodeId) {