use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandLookupTopic in project pulsar by yahoo.
the class Commands method newLookup.
public static ByteBuf newLookup(String topic, boolean authoritative, long requestId) {
CommandLookupTopic.Builder lookupTopicBuilder = CommandLookupTopic.newBuilder();
lookupTopicBuilder.setTopic(topic);
lookupTopicBuilder.setRequestId(requestId);
lookupTopicBuilder.setAuthoritative(authoritative);
CommandLookupTopic lookupBroker = lookupTopicBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.LOOKUP).setLookupTopic(lookupBroker));
lookupTopicBuilder.recycle();
lookupBroker.recycle();
return res;
}
Aggregations