Hi jerry, There are two important benefits:
1. It is a simple interface for users, without requiring user to make a message collector by himself. There are many scenarios where users will use batch processing. For example bulk insert database rows, if user goes to implement a bulk message collector, still need to consider maxNumMessages maxNumBytes and timeout of the message collector. 2. Another benefit as mentioned in the last part of the proposal, this can allow lazy deserialization and object creation in the future. Thanks for your replay Regards, Penghui Jerry Peng <jerry.boyang.p...@gmail.com> 于2019年7月16日周二 上午2:58写道: > Hi Penghui, > > So what is the major benefit of using the proposed batch receive API > versus just buffering messages in my application code? In terms of > performance, consumers already receive messages as batches from the > broker. Though the current API only allows the user to retrieve a > message one at a time. > > Best, > > Jerry > > On Wed, Jul 3, 2019 at 11:18 PM PengHui Li <codelipeng...@gmail.com> > wrote: > > > > Dear all > > > > This is a PIP to add feature of batch receiving messages > > > > https://github.com/apache/pulsar/wiki/PIP-38%3A-Batch-Receiving-Messages > > > > Please take a look. > > > > — > > Regards, > > Penghui Li >