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: [email protected]

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

Reply via email to