Which Componentspring-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.
- Set a header to message which have been consumed successfully, and filter messages by the property.
- Sign the index of the message which throw exception, and set the index to context by
context.setAckIndex(index)
. It needs to modify methodprocessConsumeResult
of classConsumeMessageConcurrentlyService
to set the number of retransmitted messages. - Hand over the processing logic to the users.
1条答案
按热度按时间zsohkypk1#
please try the beta version #2029 to see if it solves your problem, or provide us more information to help find the latent bug.