apache / rocketmq

Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications.
https://rocketmq.apache.org/
Apache License 2.0
21.16k stars 11.66k forks source link

[Bugs]auto-bach cause some bugs #7764

Open zhiliatom opened 9 months ago

zhiliatom commented 9 months ago

Before Creating the Bug Report

Runtime platform environment

centos7

RocketMQ version

latest

JDK Version

jdk1.8

Describe the Bug

producer.setAutobatch(true) and send some inner-batch message, will cause some strange things

  1. query messge by msgid can't decode message body image
  2. when consume batch-message, and one of batch consume failed, will not reconsume

Steps to Reproduce

as below "testbatch":{ "attributes":{ "queue.type":"BatchCQ" }, "order":false, "perm":6, "readQueueNums":8, "topicFilterType":"SINGLE_TAG", "topicName":"testbatch", "topicSysFlag":0, "writeQueueNums":8 },

What Did You Expect to See?

as below

What Did You See Instead?

as below

Additional Context

No response

RongtongJin commented 9 months ago

PTAL @guyinyou

guyinyou commented 9 months ago

Is this topic of batchConsumeQueue type?

zhiliatom commented 9 months ago

Is this topic of batchConsumeQueue type?

yes

guyinyou commented 9 months ago

A msgId in batchConsumerQueue corresponds to an entire batch. If you want to maintain the same semantics as before, use an normal topic.

zhiliatom commented 9 months ago

A msgId in batchConsumerQueue corresponds to an entire batch. If you want to maintain the same semantics as before, use an normal topic.

When consume one of batch fail, will not even reconsume, sound unreasonable。

guyinyou commented 9 months ago

What version that consumer?

francisoliverlee commented 8 months ago

can you show your producer and consumer code, and their client version pls