Rocketmq: send message with empty Body cause NullPointerException

Created on 17 Jun 2020  ·  8Comments  ·  Source: apache/rocketmq

BUG REPORT

  1. when client receive empty body message from broker,consumeService throw NullPointerException

image

broker bug discuss

Most helpful comment

@Jaskey In java sdk of rocketmq, it check the message body exactly.But our members use other language rocektmq sdk, such as rocektmq-go sdk. I also put forward a issue. https://github.com/apache/rocketmq-client-go/issues/501

All 8 comments

Hi, can you please provide more information on how to reproduce this problem, including

  • which version rocketmq-client/rocketmq you are using (because we need to locate which line caused the problem, but different version has different line numbers)
  • ...

Thanks so much and we will follow up~

Hi, can you please provide more information on how to reproduce this problem, including

  • which version rocketmq-client/rocketmq you are using (because we need to locate which line caused the problem, but different version has different line numbers)
  • ...

Thanks so much and we will follow up~

rocketmq version is 4.5.1

I think it's necessary to add the empty Body limination logical codes for messages on broker. @ShannonDing @wangshaojie4039 @RongtongJin

IMO,empty body should be allowed, sometimes mq just used to notify clients about sth change with no message.
I think should fix the client's problem instead of add limit on broker

@wangshaojie4039 how do you produce this message to producer? Since the producer api should check if the body is null

@Jaskey maybe he use other client instead of java client

@Jaskey In java sdk of rocketmq, it check the message body exactly.But our members use other language rocektmq sdk, such as rocektmq-go sdk. I also put forward a issue. https://github.com/apache/rocketmq-client-go/issues/501

@zongtanghu Thx, would you please help to review the bug fix pr https://github.com/apache/rocketmq/pull/2104 ?

Was this page helpful?
0 / 5 - 0 ratings