rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] Bug title Class Message can not be serialized by json

Open LetLetMe opened this issue 3 years ago • 1 comments

Before Creating the Bug Report

  • [X] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [X] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • [X] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

ubuntu

RocketMQ version

5.1.5

JDK Version

11

Describe the Bug

The Message class lacks some getter and setter methods, which causes an error during the JSON serialization of Message and its subclasses. This is because the JSON serialization framework relies on getter and setter methods to infer properties.

Steps to Reproduce

add getter and setter method

What Did You Expect to See?

class Message can be serialized

What Did You See Instead?

class Message can not be serialized

Additional Context

The Message class lacks some getter and setter methods, which causes an error during the JSON serialization of Message and its subclasses. This is because the JSON serialization framework relies on getter and setter methods to infer properties.

LetLetMe avatar Oct 10 '23 08:10 LetLetMe

pr #7439

LetLetMe avatar Oct 10 '23 09:10 LetLetMe