You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/02/08 23:04:28 UTC

[GitHub] merlimat commented on issue #1089: WIP - PIP-12 Introduce builder for creating Producer Consumer Reader

merlimat commented on issue #1089: WIP - PIP-12 Introduce builder for creating Producer Consumer Reader
URL: https://github.com/apache/incubator-pulsar/pull/1089#issuecomment-364279251
 
 
   The other doubt here was which form would be preferred between: 
   
   ```java
   Producer producer = client.newProducer().topic("my-topic").create();
   ```
   versus
   
   ```java
   Producer producer = client.newProducer("my-topic").create();
   ```
   
   This is regarding required and optional parameters.
   
   The 2nd is a bit more concise, though that doesn't mean a lot if you're setting multiple options anyway.
   
   Opinions with respect to this?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services