rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Enhancement] ConsumeMessageConcurrentlyService#submitConsumeRequest code should be more concise

Open biningo opened this issue 1 year ago • 0 comments

Before Creating the Enhancement Request

  • [X] I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

ConsumeMessageConcurrentlyService#submitConsumeRequest code should be more concise.

  1. Because the consumeExecutor uses a LinkedBlockingQueue, so as with ConsumeMessageConcurrentlyService#submitConsumeRequestLater , exception catching is unnecessary.
  2. The code for submitting messages to the consumer in batches should be more concise. https://github.com/apache/rocketmq/blob/b37d283793f4d77ec787a7e6292838783db54a8b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java#L187-L223 https://github.com/apache/rocketmq/blob/b37d283793f4d77ec787a7e6292838783db54a8b/client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageConcurrentlyService.java#L346-L356

Motivation

.

Describe the Solution You'd Like

I will optimise the submitConsumeRequest and remove unnecessary exception catching.

Describe Alternatives You've Considered

.

Additional Context

No response

biningo avatar Apr 26 '24 12:04 biningo