This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 76cd3892e7 [ISSUE #10093] Enhance delayed message type validation in 
batch send (#10094)
76cd3892e7 is described below

commit 76cd3892e7020bb6cc2af7ce5b8514b2b9daf89d
Author: yx9o <[email protected]>
AuthorDate: Wed Feb 11 17:03:53 2026 +0800

    [ISSUE #10093] Enhance delayed message type validation in batch send 
(#10094)
---
 .../main/java/org/apache/rocketmq/common/message/MessageBatch.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/common/src/main/java/org/apache/rocketmq/common/message/MessageBatch.java 
b/common/src/main/java/org/apache/rocketmq/common/message/MessageBatch.java
index 30369b8f37..448484300b 100644
--- a/common/src/main/java/org/apache/rocketmq/common/message/MessageBatch.java
+++ b/common/src/main/java/org/apache/rocketmq/common/message/MessageBatch.java
@@ -45,8 +45,8 @@ public class MessageBatch extends Message implements 
Iterable<Message> {
         List<Message> messageList = new ArrayList<>(messages.size());
         Message first = null;
         for (Message message : messages) {
-            if (message.getDelayTimeLevel() > 0) {
-                throw new UnsupportedOperationException("TimeDelayLevel is not 
supported for batching");
+            if (message.getDelayTimeLevel() > 0 || message.getDelayTimeMs() > 
0 || message.getDelayTimeSec() > 0 || message.getDeliverTimeMs() > 0) {
+                throw new UnsupportedOperationException("Delayed messages are 
not supported for batching");
             }
             if 
(message.getTopic().startsWith(MixAll.RETRY_GROUP_TOPIC_PREFIX)) {
                 throw new UnsupportedOperationException("Retry Group is not 
supported for batching");

Reply via email to