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 2017/12/21 22:23:16 UTC

[GitHub] merlimat commented on a change in pull request #987: Add Type information to Pulsar client interface

merlimat commented on a change in pull request #987: Add Type information to Pulsar client interface
URL: https://github.com/apache/incubator-pulsar/pull/987#discussion_r158392082
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/api/PulsarClient.java
 ##########
 @@ -73,7 +73,9 @@ public static PulsarClient create(String serviceUrl, ClientConfiguration conf) t
      * @throws PulsarClientException.AuthorizationException
      *             if the authorization to publish on topic was denied
      */
-    Producer createProducer(String topic) throws PulsarClientException;
+    Producer<byte[]> createProducer(String topic) throws PulsarClientException;
+
+    <T> Producer<T> createProducer(String topic, Codec<T> codec) throws PulsarClientException;
 
 Review comment:
   I like the syntax!
   
   About `Codec` should we name it actually something like `Schema` to imply this will not be used just for serialize/deserialize but also for schema validation?

----------------------------------------------------------------
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