emqx-extension-examples icon indicating copy to clipboard operation
emqx-extension-examples copied to clipboard

java in method onMessagePublish() cannot change message payload?

Open Bevr2020 opened this issue 3 years ago • 0 comments

final Message destMsg = Message.newBuilder(request.getMessage()).setPayload(ByteString.copyFrom("11"),Charset.defaultCharset()).build(); ValueResponse reply = ValueResponse.newBuilder().setMessage(destMsg).build();

input message like: {"msg":"hello"}

but output message is same as input message, not the expected value "11",why?

Bevr2020 avatar May 20 '21 06:05 Bevr2020