You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (JIRA)" <ji...@apache.org> on 2013/11/11 00:01:17 UTC

[jira] [Commented] (BOOKKEEPER-502) Hedwig client utils to avoid protobuf boilerplate

    [ https://issues.apache.org/jira/browse/BOOKKEEPER-502?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818608#comment-13818608 ] 

Sijie Guo commented on BOOKKEEPER-502:
--------------------------------------

moved hedwig related task out of 4.3.0.

> Hedwig client utils to avoid protobuf boilerplate
> -------------------------------------------------
>
>                 Key: BOOKKEEPER-502
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-502
>             Project: Bookkeeper
>          Issue Type: Bug
>            Reporter: Ivan Kelly
>
> Doing anything with the hedwig java client requires a lot of boilerplate protobuf code.
> For example
> {code}
> SubscriptionOptions options = SubscriptionOptions.newBuilder()
>      .setCreateOrAttach(CreateOrAttach.CREATE).build();
> client.getSubscriber().asyncSubscribe(ByteString.copyFromUtf8("myTopic"),
>                                       ByteString.copyFromUtf8("mySubscription"),
>                                       options,
>                                       myCallback,
>                                       myContext);
> {code}
> It would be nice to be able to write something like
> {code}
> client.getSubscriber().asyncSubscriber(_s("myTopic"), _s("mySubscription"), 
>                                        _subOpts(CreateOrAttach.CREATE),
>                                        myCallback, myContext);
> {code}
> For this we need a ClientUtils class with statics. This JIRA is to create that class and discuss what should be in it.



--
This message was sent by Atlassian JIRA
(v6.1#6144)