alibaba / alibaba/spring-cloud-alibaba

Some questions of batch messages consumption

Open
#819 1 comment 0 reactions 1 assignee Claimed by @zkzlx View on GitHub
area/rocketmq kind/discussion
Dominant language
Java
Stars
29.2k
Forks
8.5k
Avg merge
1d 23h
Merged PRs (30d)
12

Description

**Which Component**
`spring-cloud-stream-binder-rocketmq`

**Describe the solution you'd like**
Support batch messages consumption.

**Describe alternatives you've considered**
When we would like to use batch messages consumption feature, we can set `consumeMessageBatchMaxSize` property to `consumer`, then consumer will pull a batch of messages on method `consumeMessage` of `DefaultMessageListenerConcurrently` or `DefaultMessageListenerOrderly` if message accumulation occurs. If one of this batch of messages throw an exception, the batch of messages would be sent to `%RETRY%` topic, it would cause Repeat Purchases. I have some ideas about this question.
1. Set a header to message which have been consumed successfully, and filter messages by the property.
2. Sign the index of the message which throw exception, and set the index to context by `context.setAckIndex(index)`. It needs to modify method `processConsumeResult` of class `ConsumeMessageConcurrentlyService` to set the number of retransmitted messages.
3. Hand over the processing logic to the users.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.