[ https://issues.apache.org/jira/browse/BOOKKEEPER-502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sijie Guo updated BOOKKEEPER-502: --------------------------------- Fix Version/s: (was: 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)