use of org.apache.pulsar.common.api.proto.PulsarApi.CommandFlow in project incubator-pulsar by apache.
the class Commands method newFlow.
public static ByteBuf newFlow(long consumerId, int messagePermits) {
CommandFlow.Builder flowBuilder = CommandFlow.newBuilder();
flowBuilder.setConsumerId(consumerId);
flowBuilder.setMessagePermits(messagePermits);
CommandFlow flow = flowBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.FLOW).setFlow(flowBuilder));
flow.recycle();
flowBuilder.recycle();
return res;
}
Aggregations