Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] rocketmq-clients/golang与rocketmq-clients/java对数据解压的实现方式不一致导致gzip解压数据出错 #667

Open
3 tasks done
Justin1210 opened this issue Jan 15, 2024 · 5 comments
Assignees
Labels
no stale This will never be considered stale type/bug Something isn't working

Comments

@Justin1210
Copy link

Before Creating the Bug Report

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

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

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

Programming Language of the Client

Go

Runtime Platform Environment

linux

RocketMQ Version of the Client/Server

消息队列 RocketMQ 版、RocketMQ5.1.4

Run or Compiler Version

openjdk version "1.8.0_392"

Describe the Bug

当消息生产者生产的消息时经过gzip压缩处理后,使用rocketmq-clients/golang 下的SimpleConsumer进行消费时无法正常解压出消息的body, 调试发现调用解压数据的操作utils.GZIPDecode会有错误消息:“gzip:invalid header”输出。我尝试使用rocketmq-clients/java下的SimpleConsumer例子测试,发现可以正常消费消息解压出数据,也就是说java版实现压缩和解压的方式与go的并不相同这个是为什么?java压缩使用的是zlib,在go中使用compress/gzip按标准的gzip解压,为什么不让它一致呢?
WechatIMG17

WX20240115-180435@2x

Steps to Reproduce

消息生产者使用rocketmq-client 4.8.0 去生产一条比较大的消息,消息的body大于compressMsgBodyOverHowmuch设定默认的值4K,然后久会触发压缩消息操作UtilAll.compress(body, this.zipCompressLevel),然后使用rocketmq-clients/golang 下的SimpleConsumer去消费这条消息,就出现错误了

What Did You Expect to See?

数据能正常解析出来

What Did You See Instead?

WechatIMG17

Additional Context

No response

@Justin1210 Justin1210 added the type/bug Something isn't working label Jan 15, 2024
@zhenliemao
Copy link

can i work on this?

Copy link

This issue is stale because it has been open for 30 days with no activity. It will be closed in 3 days if no further activity occurs.

@github-actions github-actions bot added the stale Pull request is stale label Feb 18, 2024
@lizhanhui lizhanhui added no stale This will never be considered stale and removed stale Pull request is stale labels Feb 18, 2024
@lizhanhui
Copy link
Contributor

@zhenliemao You are welcome to work on this issue.

@chendong0120
Copy link
Contributor

Python has the same problem

@chendong0120
Copy link
Contributor

兄弟你的问题应该和我一样, 可以看一下 这个提交 #722

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no stale This will never be considered stale type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants