use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess in project pulsar by yahoo.
the class Commands method newProducerSuccess.
public static ByteBuf newProducerSuccess(long requestId, String producerName) {
CommandProducerSuccess.Builder producerSuccessBuilder = CommandProducerSuccess.newBuilder();
producerSuccessBuilder.setRequestId(requestId);
producerSuccessBuilder.setProducerName(producerName);
CommandProducerSuccess producerSuccess = producerSuccessBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.PRODUCER_SUCCESS).setProducerSuccess(producerSuccess));
producerSuccess.recycle();
producerSuccessBuilder.recycle();
return res;
}
Aggregations