openmessaging / openmessaging-java

OpenMessaging Runtime Interface for Java
http://openmessaging.cloud/
Apache License 2.0
723 stars 220 forks source link

Clarify batch send semantic? #30

Open duhenglucky opened 5 years ago

duhenglucky commented 5 years ago

As interface shows below:

    /**
     * <p>
     * Send batch messages to server.
     *
     * @param messages messages to be sent.
     */
    void send(List<Message> messages);

This API can lead to multiple behaviors, such as sending to multiple partitions, or the same partition, so how should we define the behavior of this method?

And this issue exists in many places, such as sequential messages, transactional message etc. So I think we should polish this interface before we release the 1.0.0 version.