Skip to content

实体消息包含LocalDateTime字段无法被正常消费 #3808

@Jenyow

Description

@Jenyow
  1. Please describe the issue you observed:
    不加额外添加配置,使用 RocketMQTemplate 发送 实体字段中包含 LocalDateTime 的消息,用 @RocketMQMessageListener 声明的消费者无法正常转换 LocalDateTime 字段。

  2. Please tell us about your environment:

  • spring-boot:2.3.12.RELEASE
  • rocketmq-spring-boot-starter:2.2.1
  1. Other information (e.g. detailed explanation, logs, related issues, suggestions how to fix, etc):
  • 发现其它 ISSUE 中也有同样的问题,说明这不是个例问题,但是最后都没有看到解决的方案就关闭了。
  • rocketmq-spring-boot-starter 的 sample 中没有提供涉及 LocalDateTime 的实体消息收发。
  • 经过了很多断点调试尝试,还是解决不了,所以才来这里提问。望大神指点一下。

(有种折中的办法就是将实体先转成 json 字符串,然后消费者再将 json 字符串转换为实体。不知道那些关闭的关于 LocalDateTime 的 ISSUE 是不是最后都这样就算了。抱着学习的态度,还是希望从根本上知道解决方案,谢谢)

FEATURE REQUEST

  1. Please describe the feature you are requesting.
    希望在 rocketmq-spring-boot-starter 的 sample 中提供包含 LocalDateTime 的实体消息收发的例子

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions