use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandUnsubscribe in project pulsar by yahoo.
the class Commands method newUnsubscribe.
public static ByteBuf newUnsubscribe(long consumerId, long requestId) {
CommandUnsubscribe.Builder unsubscribeBuilder = CommandUnsubscribe.newBuilder();
unsubscribeBuilder.setConsumerId(consumerId);
unsubscribeBuilder.setRequestId(requestId);
CommandUnsubscribe unsubscribe = unsubscribeBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.UNSUBSCRIBE).setUnsubscribe(unsubscribe));
unsubscribeBuilder.recycle();
unsubscribe.recycle();
return res;
}
Aggregations