use of org.apache.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages in project incubator-pulsar by apache.
the class Commands method newRedeliverUnacknowledgedMessages.
public static ByteBuf newRedeliverUnacknowledgedMessages(long consumerId) {
CommandRedeliverUnacknowledgedMessages.Builder redeliverBuilder = CommandRedeliverUnacknowledgedMessages.newBuilder();
redeliverBuilder.setConsumerId(consumerId);
CommandRedeliverUnacknowledgedMessages redeliver = redeliverBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.REDELIVER_UNACKNOWLEDGED_MESSAGES).setRedeliverUnacknowledgedMessages(redeliverBuilder));
redeliver.recycle();
redeliverBuilder.recycle();
return res;
}
use of org.apache.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages in project incubator-pulsar by apache.
the class Commands method newRedeliverUnacknowledgedMessages.
public static ByteBuf newRedeliverUnacknowledgedMessages(long consumerId, List<MessageIdData> messageIds) {
CommandRedeliverUnacknowledgedMessages.Builder redeliverBuilder = CommandRedeliverUnacknowledgedMessages.newBuilder();
redeliverBuilder.setConsumerId(consumerId);
redeliverBuilder.addAllMessageIds(messageIds);
CommandRedeliverUnacknowledgedMessages redeliver = redeliverBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.REDELIVER_UNACKNOWLEDGED_MESSAGES).setRedeliverUnacknowledgedMessages(redeliverBuilder));
redeliver.recycle();
redeliverBuilder.recycle();
return res;
}
Aggregations