dongeforever commented on a change in pull request #3807:
URL: https://github.com/apache/rocketmq/pull/3807#discussion_r794459816



##########
File path: 
client/src/main/java/org/apache/rocketmq/client/producer/MQProducer.java
##########
@@ -91,6 +91,10 @@ TransactionSendResult sendMessageInTransaction(final Message 
msg,
     SendResult send(final Collection<Message> msgs) throws MQClientException, 
RemotingException, MQBrokerException,
         InterruptedException;
 
+    // for batch msgs with multi topics.
+    SendResult sendMultiTopicBatch(final Collection<Message> msgs) throws 
MQClientException, RemotingException, MQBrokerException,
+            InterruptedException;
+

Review comment:
       Who has the responsibility to make sure the messages are to be sent to 
the same broker? How to make sure it?
   
   This API may cause many difficulties to be compatible with advanced 
features, such as logic queue and message with sharding key.
   
   Only the inner topic route has enough information to decide which broker to 
be sent for each message. So the multi-topic batch can only be constructed by 
the inner MQClientInstance, but not by the user directly.
   
   IMO, it is necessary to raise a RIP and provide a detailed design for this 
feature.
   
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to