You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/07/08 01:55:44 UTC

[GitHub] [rocketmq] lizhanhui commented on issue #3417: [RIP-25]Simplifying Producer and Consumer APIs

lizhanhui commented on issue #3417:
URL: https://github.com/apache/rocketmq/issues/3417#issuecomment-1178450974

   > This is a topic worth discussing.
   > 
   > > * Clients like `DefaultMQProuder`, `DefaultMQPushConsumer`, `DefaultLitePullConsumer` provide several constructors and setters, user may feel difficult to use them correctly.
   > 
   > For this, I think we can create all kinds of producers, consumers and admins through a single 'Client' instance.
   > 
   > > * `MQProducer` and `MQConsumer` extends `MQAdmin` which makes them provide too many methods that are not related to message sending and consuming.
   > 
   > > * There are about 20 methods for sending messages in `MQProducer,` some of which requires `timeout` parameter, and it is so rare to set timeout for every sending operation.
   > 
   > For these two, We could polish the interfaces in like 'MQProducer', or create a new one to provide all kinds of necessary operations. An instance of MQProducer can be returned by the `Client.newProducer()`,and user should not consider the implementation underlying, like it's an object of 'DefaultMQProuder' .
   
   To allow further configuration, how about `Client.newProducerBuilder().withXXX().withYYY().build()`


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org