You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tubemq.apache.org by "Guo Jiwei (Jira)" <ji...@apache.org> on 2020/04/17 14:38:00 UTC
[jira] [Assigned] (TUBEMQ-73) fix crc32 checksum in broker
[ https://issues.apache.org/jira/browse/TUBEMQ-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guo Jiwei reassigned TUBEMQ-73:
-------------------------------
Assignee: Guo Jiwei
> fix crc32 checksum in broker
> ----------------------------
>
> Key: TUBEMQ-73
> URL: https://issues.apache.org/jira/browse/TUBEMQ-73
> Project: Apache TubeMQ
> Issue Type: Improvement
> Reporter: Guo Jiwei
> Assignee: Guo Jiwei
> Priority: Normal
>
> BrokerServiceServer is always doing crc32 checksum when producing message, we should only check it when producer enable it.
> {code:java}
> int checkSum = CheckSum.crc32(msgData);
> if (request.getCheckSum() != -1) {
> if (checkSum != request.getCheckSum()) {
> builder.setErrCode(TErrCodeConstants.FORBIDDEN);
> builder.setErrMsg(strBuffer.append("Checksum msg data failure: ")
> .append(request.getCheckSum()).append(" of ").append(reqTopic)
> .append(" not equal to the data's checksum of ")
> .append(checkSum).toString());
> return builder.build();
> }
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)